-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSimulatorControls.cpp
More file actions
125 lines (110 loc) · 3.01 KB
/
SimulatorControls.cpp
File metadata and controls
125 lines (110 loc) · 3.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
#include "stdafx.h"
#include "SimulatorControls.h"
HWND ControlNorthUp = nullptr, ControlNorthRight = nullptr, ControlNorthDown = nullptr, ControlNorthLeft = nullptr;
HWND ControlOlmWest = nullptr, ControlOlmEast = nullptr;
HWND initControlArea(HWND hwnd)
{
return CreateWindow(L"STATIC", NULL, WS_VISIBLE | WS_CHILD | SS_BLACKFRAME, 525, 0, 300, 525, hwnd, NULL, (HINSTANCE) GetWindowLong(hwnd, GWLP_HINSTANCE), NULL);
}
BOOL initCameraControls(HWND hwnd)
{
ControlNorthUp = CreateWindow(
L"BUTTON",
L"NORTH",
WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, // Styles
100, // x position
0, // y position
100, // Button width
100, // Button height
hwnd, // Parent window
(HMENU) (CONTROL_BUTTON | CAMERA_CONTROL | Orientation::NorthUp),
(HINSTANCE) GetWindowLong(hwnd, GWLP_HINSTANCE),
NULL
);
ControlNorthRight = CreateWindow(
L"BUTTON",
L"NORTH",
WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, // Styles
200, // x position
50, // y position
100, // Button width
100, // Button height
hwnd, // Parent window
(HMENU) (CONTROL_BUTTON | CAMERA_CONTROL | Orientation::NorthRight),
(HINSTANCE) GetWindowLong(hwnd, GWLP_HINSTANCE),
NULL
);
ControlNorthDown = CreateWindow(
L"BUTTON",
L"NORTH",
WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, // Styles
100, // x position
100, // y position
100, // Button width
100, // Button height
hwnd, // Parent window
(HMENU) (CONTROL_BUTTON | CAMERA_CONTROL | Orientation::NorthDown),
(HINSTANCE) GetWindowLong(hwnd, GWLP_HINSTANCE),
NULL
);
ControlNorthLeft = CreateWindow(
L"BUTTON",
L"NORTH",
WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, // Styles
0, // x position
50, // y position
100, // Button width
100, // Button height
hwnd, // Parent window
(HMENU) (CONTROL_BUTTON | CAMERA_CONTROL | Orientation::NorthLeft),
(HINSTANCE) GetWindowLong(hwnd, GWLP_HINSTANCE),
NULL
);
if (ControlNorthUp == nullptr || ControlNorthRight == nullptr || ControlNorthDown == nullptr || ControlNorthLeft == nullptr)
{
return FALSE;
}
return TRUE;
}
BOOL initOlmPosControls(HWND hwnd)
{
ControlOlmWest = CreateWindow(
L"BUTTON",
L"<--- Olm West",
WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, // Styles
0, // x position
200, // y position
150, // Button width
50, // Button height
hwnd, // Parent window
(HMENU) (CONTROL_BUTTON | OLMPOS_CONTROL | OlmLocation::West),
(HINSTANCE) GetWindowLong(hwnd, GWLP_HINSTANCE),
NULL
);
ControlOlmEast = CreateWindow(
L"BUTTON",
L"Olm East --->",
WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, // Styles
150, // x position
200, // y position
150, // Button width
50, // Button height
hwnd, // Parent window
(HMENU) (CONTROL_BUTTON | OLMPOS_CONTROL | OlmLocation::East),
(HINSTANCE) GetWindowLong(hwnd, GWLP_HINSTANCE),
NULL
);
if (ControlOlmWest == nullptr || ControlOlmEast == nullptr)
{
return FALSE;
}
return TRUE;
}
BOOL initOlmPhaseControls(HWND hwnd)
{
return TRUE;
}
BOOL initWeaponControls(HWND hwnd)
{
return TRUE;
}