diff options
author | Timothy Flynn <trflynn89@pm.me> | 2021-05-18 08:47:52 -0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-05-18 16:48:39 +0200 |
commit | f02a13c8846af665cb41077fd97554187ac6baf8 (patch) | |
tree | 0138b79804be9ca9c309be810b8410d014aef5ce /Userland/Games/2048/GameSizeDialog.h | |
parent | 63a1be14066c6367d37cc792a171d3dfaeac517f (diff) | |
download | serenity-f02a13c8846af665cb41077fd97554187ac6baf8.zip |
2048: Intialize settings window with current values
Currently, each time you open the settings window in 2048, it displays
the default values rather than the current values. This is confusing, so
display the current values instead.
Diffstat (limited to 'Userland/Games/2048/GameSizeDialog.h')
-rw-r--r-- | Userland/Games/2048/GameSizeDialog.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Games/2048/GameSizeDialog.h b/Userland/Games/2048/GameSizeDialog.h index 6a3d982634..a3a604bde5 100644 --- a/Userland/Games/2048/GameSizeDialog.h +++ b/Userland/Games/2048/GameSizeDialog.h @@ -12,16 +12,16 @@ class GameSizeDialog : public GUI::Dialog { C_OBJECT(GameSizeDialog) public: - GameSizeDialog(GUI::Window* parent); - size_t board_size() const { return m_board_size; } u32 target_tile() const { return 1u << m_target_tile_power; } bool evil_ai() const { return m_evil_ai; } bool temporary() const { return m_temporary; } private: - size_t m_board_size { 4 }; - size_t m_target_tile_power { 11 }; - bool m_evil_ai { false }; + GameSizeDialog(GUI::Window* parent, size_t board_size, size_t target_tile, bool evil_ai); + + size_t m_board_size; + size_t m_target_tile_power; + bool m_evil_ai; bool m_temporary { true }; }; |