diff options
author | jbzdarkid <jbzdarkid@gmail.com> | 2018-11-01 20:56:56 -0700 |
---|---|---|
committer | jbzdarkid <jbzdarkid@gmail.com> | 2018-11-01 20:56:56 -0700 |
commit | 5de975b03c7200cc66188a4b1a76e1213524975d (patch) | |
tree | e3ed982a0dd4fee4db402532aeda2e6bf5e66344 /Source/Main.cpp | |
parent | 3557f0ba80942397a9d963208695b4fa80290cb0 (diff) | |
download | witness-tutorializer-5de975b03c7200cc66188a4b1a76e1213524975d.tar.gz witness-tutorializer-5de975b03c7200cc66188a4b1a76e1213524975d.tar.bz2 witness-tutorializer-5de975b03c7200cc66188a4b1a76e1213524975d.zip |
pain and suffering, but I can read/write decorations & dots.
Diffstat (limited to 'Source/Main.cpp')
-rw-r--r-- | Source/Main.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Source/Main.cpp b/Source/Main.cpp index 8336c77..8c4bf8c 100644 --- a/Source/Main.cpp +++ b/Source/Main.cpp | |||
@@ -6,13 +6,19 @@ | |||
6 | #include "Randomizer.h" | 6 | #include "Randomizer.h" |
7 | #include "Version.h" | 7 | #include "Version.h" |
8 | #include "Random.h" | 8 | #include "Random.h" |
9 | #include "Panel.h" | ||
9 | 10 | ||
10 | #define IDC_RANDOMIZE 0x401 | 11 | #define IDC_RANDOMIZE 0x401 |
11 | #define IDC_TOGGLESPEED 0x402 | 12 | #define IDC_TOGGLESPEED 0x402 |
12 | #define IDC_SPEEDRUNNER 0x403 | 13 | #define IDC_SPEEDRUNNER 0x403 |
13 | #define IDC_HARDMODE 0x404 | 14 | #define IDC_HARDMODE 0x404 |
15 | #define IDC_READ 0x405 | ||
16 | #define IDC_RANDOM 0x406 | ||
17 | #define IDC_WRITE 0x407 | ||
14 | 18 | ||
15 | HWND hwndSeed, hwndRandomize; | 19 | HWND hwndSeed, hwndRandomize; |
20 | int panel = 0x12C9; | ||
21 | std::shared_ptr<Panel> _panel; | ||
16 | 22 | ||
17 | LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) | 23 | LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) |
18 | { | 24 | { |
@@ -57,6 +63,15 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) | |||
57 | SetWindowText(hwndRandomize, L"Randomized!"); | 63 | SetWindowText(hwndRandomize, L"Randomized!"); |
58 | break; | 64 | break; |
59 | } | 65 | } |
66 | case IDC_READ: | ||
67 | _panel = std::make_shared<Panel>(panel); | ||
68 | break; | ||
69 | case IDC_RANDOM: | ||
70 | _panel->Random(); | ||
71 | break; | ||
72 | case IDC_WRITE: | ||
73 | _panel->Write(panel); | ||
74 | break; | ||
60 | } | 75 | } |
61 | } | 76 | } |
62 | return DefWindowProc(hwnd, message, wParam, lParam); | 77 | return DefWindowProc(hwnd, message, wParam, lParam); |
@@ -99,6 +114,16 @@ int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmd | |||
99 | WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, | 114 | WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, |
100 | 160, 10, 100, 26, hwnd, (HMENU)IDC_RANDOMIZE, hInstance, NULL); | 115 | 160, 10, 100, 26, hwnd, (HMENU)IDC_RANDOMIZE, hInstance, NULL); |
101 | 116 | ||
117 | CreateWindow(L"BUTTON", L"READ", | ||
118 | WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, | ||
119 | 160, 100, 100, 26, hwnd, (HMENU)IDC_READ, hInstance, NULL); | ||
120 | CreateWindow(L"BUTTON", L"RANDOM", | ||
121 | WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, | ||
122 | 160, 130, 100, 26, hwnd, (HMENU)IDC_RANDOM, hInstance, NULL); | ||
123 | CreateWindow(L"BUTTON", L"WRITE", | ||
124 | WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, | ||
125 | 160, 160, 100, 26, hwnd, (HMENU)IDC_WRITE, hInstance, NULL); | ||
126 | |||
102 | CreateWindow(L"BUTTON", L"", | 127 | CreateWindow(L"BUTTON", L"", |
103 | WS_VISIBLE | WS_CHILD | BS_CHECKBOX, | 128 | WS_VISIBLE | WS_CHILD | BS_CHECKBOX, |
104 | 10, 52, 12, 12, hwnd, (HMENU)IDC_TOGGLESPEED, hInstance, NULL); | 129 | 10, 52, 12, 12, hwnd, (HMENU)IDC_TOGGLESPEED, hInstance, NULL); |