summaryrefslogtreecommitdiff
path: root/Userland/Games/MasterWord
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2022-05-13 13:10:27 +0100
committerLinus Groh <mail@linusgroh.de>2022-05-13 16:27:43 +0200
commitcdffe556c8fcca034b10cf91f0b05c17d835bc7b (patch)
tree189cbd59652eee1b2783a8323a7194100c78fd07 /Userland/Games/MasterWord
parent1f82beded3ae3664265f1ddf6075f64ca5a08cde (diff)
downloadserenity-cdffe556c8fcca034b10cf91f0b05c17d835bc7b.zip
LibGUI+Userland: Make Dialog::ExecResult an enum class
Diffstat (limited to 'Userland/Games/MasterWord')
-rw-r--r--Userland/Games/MasterWord/main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Games/MasterWord/main.cpp b/Userland/Games/MasterWord/main.cpp
index 2d17318e26..abdeee8ff7 100644
--- a/Userland/Games/MasterWord/main.cpp
+++ b/Userland/Games/MasterWord/main.cpp
@@ -62,7 +62,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(game_menu->try_add_action(GUI::Action::create("Set &Word Length", [&](auto&) {
auto word_length = Config::read_i32("MasterWord", "", "word_length", 5);
auto word_length_string = String::number(word_length);
- if (GUI::InputBox::show(window, word_length_string, "Word length:", "MasterWord") == GUI::InputBox::ExecOK && !word_length_string.is_empty()) {
+ if (GUI::InputBox::show(window, word_length_string, "Word length:", "MasterWord") == GUI::InputBox::ExecResult::OK && !word_length_string.is_empty()) {
auto maybe_word_length = word_length_string.template to_uint();
if (!maybe_word_length.has_value() || maybe_word_length.value() < shortest_word || maybe_word_length.value() > longest_word) {
GUI::MessageBox::show(window, String::formatted("Please enter a number between {} and {}.", shortest_word, longest_word), "MasterWord");
@@ -78,7 +78,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(game_menu->try_add_action(GUI::Action::create("Set &Number Of Guesses", [&](auto&) {
auto max_guesses = Config::read_i32("MasterWord", "", "max_guesses", 5);
auto max_guesses_string = String::number(max_guesses);
- if (GUI::InputBox::show(window, max_guesses_string, "Maximum number of guesses:", "MasterWord") == GUI::InputBox::ExecOK && !max_guesses_string.is_empty()) {
+ if (GUI::InputBox::show(window, max_guesses_string, "Maximum number of guesses:", "MasterWord") == GUI::InputBox::ExecResult::OK && !max_guesses_string.is_empty()) {
auto maybe_max_guesses = max_guesses_string.template to_uint();
if (!maybe_max_guesses.has_value() || maybe_max_guesses.value() < 1 || maybe_max_guesses.value() > 20) {
GUI::MessageBox::show(window, "Please enter a number between 1 and 20.", "MasterWord");