From 65a11fb5f913be1e403e47222fb7a696100b2323 Mon Sep 17 00:00:00 2001 From: Tom Date: Thu, 16 Jul 2020 07:54:42 -0600 Subject: LibGUI: Add InputBox::show with required parent window argument Similar to MessageBox::show, this encourages passing in a window. --- Applications/KeyboardMapper/KeyboardMapperWidget.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'Applications/KeyboardMapper') diff --git a/Applications/KeyboardMapper/KeyboardMapperWidget.cpp b/Applications/KeyboardMapper/KeyboardMapperWidget.cpp index c4eca7c29f..72283e19aa 100644 --- a/Applications/KeyboardMapper/KeyboardMapperWidget.cpp +++ b/Applications/KeyboardMapper/KeyboardMapperWidget.cpp @@ -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); -- cgit v1.2.3