mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-30 04:20:23 +00:00
Use the generated goto_frame.xml.h file in cmd_goto_frame.cpp
This commit is contained in:
parent
63aac49f81
commit
52d091810b
@ -19,6 +19,8 @@
|
||||
#include "doc/sprite.h"
|
||||
#include "ui/window.h"
|
||||
|
||||
#include "goto_frame.xml.h"
|
||||
|
||||
namespace app {
|
||||
|
||||
using namespace ui;
|
||||
@ -117,17 +119,15 @@ protected:
|
||||
|
||||
frame_t onGetFrame(Editor* editor) override {
|
||||
if (m_frame == 0) {
|
||||
base::UniquePtr<Window> window(app::load_widget<Window>("goto_frame.xml", "goto_frame"));
|
||||
Widget* frame = app::find_widget<Widget>(window, "frame");
|
||||
Widget* ok = app::find_widget<Widget>(window, "ok");
|
||||
app::gen::GotoFrame window;
|
||||
|
||||
frame->setTextf("%d", editor->frame()+1);
|
||||
window.frame()->setTextf("%d", editor->frame()+1);
|
||||
|
||||
window->openWindowInForeground();
|
||||
if (window->getKiller() != ok)
|
||||
window.openWindowInForeground();
|
||||
if (window.getKiller() != window.ok())
|
||||
return editor->frame();
|
||||
|
||||
m_frame = frame->getTextInt();
|
||||
m_frame = window.frame()->getTextInt();
|
||||
}
|
||||
|
||||
return MID(0, m_frame-1, editor->sprite()->lastFrame());
|
||||
|
Loading…
x
Reference in New Issue
Block a user