|
@@ -79,15 +79,6 @@ void InputBox::build()
|
|
|
button_container_inner.set_layout<HorizontalBoxLayout>();
|
|
|
button_container_inner.layout()->set_spacing(8);
|
|
|
|
|
|
- m_cancel_button = button_container_inner.add<Button>();
|
|
|
- m_cancel_button->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed);
|
|
|
- m_cancel_button->set_preferred_size(0, 20);
|
|
|
- m_cancel_button->set_text("Cancel");
|
|
|
- m_cancel_button->on_click = [this] {
|
|
|
- dbgprintf("GUI::InputBox: Cancel button clicked\n");
|
|
|
- done(ExecCancel);
|
|
|
- };
|
|
|
-
|
|
|
m_ok_button = button_container_inner.add<Button>();
|
|
|
m_ok_button->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed);
|
|
|
m_ok_button->set_preferred_size(0, 20);
|
|
@@ -98,6 +89,15 @@ void InputBox::build()
|
|
|
done(ExecOK);
|
|
|
};
|
|
|
|
|
|
+ m_cancel_button = button_container_inner.add<Button>();
|
|
|
+ m_cancel_button->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed);
|
|
|
+ m_cancel_button->set_preferred_size(0, 20);
|
|
|
+ m_cancel_button->set_text("Cancel");
|
|
|
+ m_cancel_button->on_click = [this] {
|
|
|
+ dbgprintf("GUI::InputBox: Cancel button clicked\n");
|
|
|
+ done(ExecCancel);
|
|
|
+ };
|
|
|
+
|
|
|
m_text_editor->on_return_pressed = [this] {
|
|
|
m_ok_button->click();
|
|
|
};
|