mirror of
https://github.com/RGBCube/serenity
synced 2025-09-14 09:17:35 +00:00
LibGUI+Userland: Make Dialog::ExecResult an enum class
This commit is contained in:
parent
1f82beded3
commit
cdffe556c8
90 changed files with 232 additions and 232 deletions
|
@ -137,7 +137,7 @@ void Game::show_score_card(bool game_over)
|
|||
|
||||
auto& close_button = button_container.add<GUI::Button>("OK");
|
||||
close_button.on_click = [&score_dialog](auto) {
|
||||
score_dialog->done(GUI::Dialog::ExecOK);
|
||||
score_dialog->done(GUI::Dialog::ExecResult::OK);
|
||||
};
|
||||
close_button.set_min_width(70);
|
||||
close_button.resize(70, 30);
|
||||
|
|
|
@ -43,10 +43,10 @@ SettingsDialog::SettingsDialog(GUI::Window* parent, String player_name)
|
|||
button_layout.set_spacing(10);
|
||||
|
||||
button_box.add<GUI::Button>("Cancel").on_click = [this](auto) {
|
||||
done(Dialog::ExecCancel);
|
||||
done(ExecResult::Cancel);
|
||||
};
|
||||
|
||||
button_box.add<GUI::Button>("OK").on_click = [this](auto) {
|
||||
done(Dialog::ExecOK);
|
||||
done(ExecResult::OK);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -75,7 +75,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
auto change_settings = [&] {
|
||||
auto settings_dialog = SettingsDialog::construct(window, player_name);
|
||||
if (settings_dialog->exec() || settings_dialog->result() != GUI::Dialog::ExecOK)
|
||||
if (settings_dialog->exec() != GUI::Dialog::ExecResult::OK)
|
||||
return;
|
||||
|
||||
player_name = settings_dialog->player_name();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue