mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-03-06 21:45:29 +00:00
LibGUI: Add InputBox::show with required parent window argument
Similar to MessageBox::show, this encourages passing in a window.
This commit is contained in:
@@ -66,10 +66,8 @@ void KeyboardMapperWidget::create_frame()
|
||||
tmp_button.set_enabled(keys[i].enabled);
|
||||
|
||||
tmp_button.on_click = [&]() {
|
||||
auto input_box = GUI::InputBox::construct("New Character:", "Select Character", window());
|
||||
if (input_box->exec() == GUI::InputBox::ExecOK) {
|
||||
auto value = input_box->text_value();
|
||||
|
||||
String value;
|
||||
if (GUI::InputBox::show(value, window(), "New Character:", "Select Character") == GUI::InputBox::ExecOK) {
|
||||
int i = m_keys.find_first_index(&tmp_button).value_or(0);
|
||||
ASSERT(i > 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user