summary refs log tree commit diff stats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/Main.cpp30
1 files changed, 24 insertions, 6 deletions
diff --git a/Source/Main.cpp b/Source/Main.cpp index b227e3d..bcd7ebf 100644 --- a/Source/Main.cpp +++ b/Source/Main.cpp
@@ -10,8 +10,10 @@
10 10
11#define IDC_RANDOMIZE 0x401 11#define IDC_RANDOMIZE 0x401
12#define IDC_TOGGLESPEED 0x402 12#define IDC_TOGGLESPEED 0x402
13#define IDC_SPEEDRUNNER 0x403
14#define IDC_HARDMODE 0x404
13 15
14HWND hwndSeed, hwndRandomize, hwndSpeedSetting; 16HWND hwndSeed, hwndRandomize;
15 17
16LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) 18LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
17{ 19{
@@ -23,10 +25,10 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
23 switch (LOWORD(wParam)) { 25 switch (LOWORD(wParam)) {
24 // Speed checkbox 26 // Speed checkbox
25 case IDC_TOGGLESPEED: 27 case IDC_TOGGLESPEED:
26 if (IsDlgButtonChecked(hwndSpeedSetting, 1)) { 28 if (IsDlgButtonChecked(hwnd, IDC_TOGGLESPEED)) {
27 CheckDlgButton(hwndSpeedSetting, 1, BST_UNCHECKED); 29 CheckDlgButton(hwnd, IDC_TOGGLESPEED, BST_UNCHECKED);
28 } else { 30 } else {
29 CheckDlgButton(hwndSpeedSetting, 1, BST_CHECKED); 31 CheckDlgButton(hwnd, IDC_TOGGLESPEED, BST_CHECKED);
30 } 32 }
31 break; 33 break;
32 34
@@ -50,7 +52,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
50 srand(seed); 52 srand(seed);
51 Randomizer randomizer; 53 Randomizer randomizer;
52 randomizer.Randomize(); 54 randomizer.Randomize();
53 if (IsDlgButtonChecked(hwndSpeedSetting, 1)) { 55 if (IsDlgButtonChecked(hwnd, IDC_TOGGLESPEED)) {
54 randomizer.AdjustSpeed(); 56 randomizer.AdjustSpeed();
55 } 57 }
56 SetWindowText(hwndRandomize, L"Randomized!"); 58 SetWindowText(hwndRandomize, L"Randomized!");
@@ -101,13 +103,29 @@ int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmd
101 WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, 103 WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON,
102 160, 10, 100, 26, hwnd, (HMENU)IDC_RANDOMIZE, hInstance, NULL); 104 160, 10, 100, 26, hwnd, (HMENU)IDC_RANDOMIZE, hInstance, NULL);
103 105
104 hwndSpeedSetting = CreateWindow(L"BUTTON", L"", 106 CreateWindow(L"BUTTON", L"",
105 WS_VISIBLE | WS_CHILD | BS_CHECKBOX, 107 WS_VISIBLE | WS_CHILD | BS_CHECKBOX,
106 10, 52, 12, 12, hwnd, (HMENU)IDC_TOGGLESPEED, hInstance, NULL); 108 10, 52, 12, 12, hwnd, (HMENU)IDC_TOGGLESPEED, hInstance, NULL);
107 CreateWindow(L"STATIC", L"Speed up various autoscrollers", 109 CreateWindow(L"STATIC", L"Speed up various autoscrollers",
108 WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT, 110 WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT,
109 27, 50, 205, 16, hwnd, NULL, hInstance, NULL); 111 27, 50, 205, 16, hwnd, NULL, hInstance, NULL);
110 112
113 /*
114 CreateWindow(L"BUTTON", L"",
115 WS_VISIBLE | WS_CHILD | BS_CHECKBOX,
116 10, 52, 12, 12, hwnd, (HMENU)IDC_SPEEDRUNNER, hInstance, NULL);
117 CreateWindow(L"STATIC", L"Allow hard-to-identify panels to be shuffled",
118 WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT,
119 27, 50, 205, 16, hwnd, NULL, hInstance, NULL);
120
121 CreateWindow(L"BUTTON", L"",
122 WS_VISIBLE | WS_CHILD | BS_CHECKBOX,
123 10, 52, 12, 12, hwnd, (HMENU)IDC_HARDMODE, hInstance, NULL);
124 CreateWindow(L"STATIC", L"Place harder puzzles in annoying spots",
125 WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT,
126 27, 50, 205, 16, hwnd, NULL, hInstance, NULL);
127 */
128
111 ShowWindow(hwnd, nCmdShow); 129 ShowWindow(hwnd, nCmdShow);
112 UpdateWindow(hwnd); 130 UpdateWindow(hwnd);
113 131