mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:17:46 +00:00
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.
This commit is contained in:
parent
63a1be1406
commit
f02a13c884
3 changed files with 17 additions and 8 deletions
|
@ -11,9 +11,13 @@
|
|||
#include <LibGUI/CheckBox.h>
|
||||
#include <LibGUI/Label.h>
|
||||
#include <LibGUI/SpinBox.h>
|
||||
#include <math.h>
|
||||
|
||||
GameSizeDialog::GameSizeDialog(GUI::Window* parent)
|
||||
GameSizeDialog::GameSizeDialog(GUI::Window* parent, size_t board_size, size_t target, bool evil_ai)
|
||||
: GUI::Dialog(parent)
|
||||
, m_board_size(board_size)
|
||||
, m_target_tile_power(log2(target))
|
||||
, m_evil_ai(evil_ai)
|
||||
{
|
||||
set_rect({ 0, 0, 200, 150 });
|
||||
set_title("New Game");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue