mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 03:08:11 +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
|
@ -9,7 +9,7 @@
|
|||
#include "Field.h"
|
||||
#include <Games/Minesweeper/MinesweeperCustomGameWindowGML.h>
|
||||
|
||||
int CustomGameDialog::show(GUI::Window* parent_window, Field& field)
|
||||
GUI::Dialog::ExecResult CustomGameDialog::show(GUI::Window* parent_window, Field& field)
|
||||
{
|
||||
auto dialog = CustomGameDialog::construct(parent_window);
|
||||
|
||||
|
@ -24,12 +24,12 @@ int CustomGameDialog::show(GUI::Window* parent_window, Field& field)
|
|||
|
||||
auto result = dialog->exec();
|
||||
|
||||
if (result != GUI::Dialog::ExecOK)
|
||||
if (result != ExecResult::OK)
|
||||
return result;
|
||||
|
||||
field.set_field_size(Field::Difficulty::Custom, dialog->m_rows_spinbox->value(), dialog->m_columns_spinbox->value(), dialog->m_mines_spinbox->value());
|
||||
|
||||
return GUI::Dialog::ExecOK;
|
||||
return ExecResult::OK;
|
||||
}
|
||||
|
||||
void CustomGameDialog::set_max_mines()
|
||||
|
@ -66,11 +66,11 @@ CustomGameDialog::CustomGameDialog(Window* parent_window)
|
|||
};
|
||||
|
||||
m_ok_button->on_click = [this](auto) {
|
||||
done(ExecResult::ExecOK);
|
||||
done(ExecResult::OK);
|
||||
};
|
||||
|
||||
m_cancel_button->on_click = [this](auto) {
|
||||
done(ExecResult::ExecCancel);
|
||||
done(ExecResult::Cancel);
|
||||
};
|
||||
|
||||
set_max_mines();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue