annotate GUIWindow.h @ 12:144f4815e63a

16.01.13
author Ritor1
date Wed, 16 Jan 2013 18:38:36 +0600
parents 8e33efd39355
children 66319a734368
rev   line source
0
Ritor1
parents:
diff changeset
1 #pragma once
Ritor1
parents:
diff changeset
2 #include "GUIButton.h"
Ritor1
parents:
diff changeset
3
Ritor1
parents:
diff changeset
4
Ritor1
parents:
diff changeset
5
Ritor1
parents:
diff changeset
6
Ritor1
parents:
diff changeset
7
Ritor1
parents:
diff changeset
8 /* 251 */
Ritor1
parents:
diff changeset
9 enum MENU_STATE : __int32
Ritor1
parents:
diff changeset
10 {
Ritor1
parents:
diff changeset
11 MENU_MAIN = 0x0,
Ritor1
parents:
diff changeset
12 MENU_NEWGAME = 0x1,
Ritor1
parents:
diff changeset
13 MENU_CREDITS = 0x2,
Ritor1
parents:
diff changeset
14 MENU_SAVELOAD = 0x3,
Ritor1
parents:
diff changeset
15 MENU_FINISHED = 0x4,
Ritor1
parents:
diff changeset
16 MENU_5 = 0x5,
Ritor1
parents:
diff changeset
17 MENU_CREATEPARTY = 0x6,
Ritor1
parents:
diff changeset
18 MENU_7 = 0x7,
Ritor1
parents:
diff changeset
19 MENU_Credits = 0x8,
Ritor1
parents:
diff changeset
20 MENU_LOAD = 0x9,
Ritor1
parents:
diff changeset
21 MENU_10 = 0xA,
Ritor1
parents:
diff changeset
22 };
Ritor1
parents:
diff changeset
23
Ritor1
parents:
diff changeset
24
Ritor1
parents:
diff changeset
25
Ritor1
parents:
diff changeset
26
Ritor1
parents:
diff changeset
27
Ritor1
parents:
diff changeset
28
Ritor1
parents:
diff changeset
29
Ritor1
parents:
diff changeset
30
Ritor1
parents:
diff changeset
31
Ritor1
parents:
diff changeset
32 /* 298 */
Ritor1
parents:
diff changeset
33 enum WindowType: unsigned __int32
Ritor1
parents:
diff changeset
34 {
Ritor1
parents:
diff changeset
35 WINDOW_null = 0,
Ritor1
parents:
diff changeset
36 WINDOW_MainMenu = 0x1,
Ritor1
parents:
diff changeset
37 WINDOW_CharacterRecord = 0x4,
Ritor1
parents:
diff changeset
38 WINDOW_Options = 0x6,
Ritor1
parents:
diff changeset
39 WINDOW_Book = 0x9,
Ritor1
parents:
diff changeset
40 WINDOW_A = 10,
Ritor1
parents:
diff changeset
41 WINDOW_11 = 17,
Ritor1
parents:
diff changeset
42 WINDOW_12 = 18,
Ritor1
parents:
diff changeset
43 WINDOW_13 = 19,
Ritor1
parents:
diff changeset
44 WINDOW_Chest = 0x14,
Ritor1
parents:
diff changeset
45 WINDOW_MainMenu_Load = 0x18,
Ritor1
parents:
diff changeset
46 WINDOW_HouseInterior = 0x19,
Ritor1
parents:
diff changeset
47 WINDOW_1A = 26,
Ritor1
parents:
diff changeset
48 WINDOW_1B = 27,
Ritor1
parents:
diff changeset
49 WINDOW_1E = 30,
Ritor1
parents:
diff changeset
50 WINDOW_1F = 31,
Ritor1
parents:
diff changeset
51 WINDOW_FinalWindow = 0x46,
Ritor1
parents:
diff changeset
52 WINDOW_5A = 0x5A,
Ritor1
parents:
diff changeset
53 WINDOW_5E = 0x5E,
4
8e33efd39355 15.01.13(work)
Ritor1
parents: 3
diff changeset
54 WINDOW_5F = 0x5F,
8e33efd39355 15.01.13(work)
Ritor1
parents: 3
diff changeset
55 WINDOW_60 = 0x60,
0
Ritor1
parents:
diff changeset
56 WINDOW_KeyMappingOptions = 0x69,
Ritor1
parents:
diff changeset
57 WINDOW_VideoOptions = 0x6A
Ritor1
parents:
diff changeset
58 };
Ritor1
parents:
diff changeset
59
Ritor1
parents:
diff changeset
60 /* 155 */
Ritor1
parents:
diff changeset
61 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
62 struct GUIWindow
Ritor1
parents:
diff changeset
63 {
Ritor1
parents:
diff changeset
64 GUIButton *CreateButton(unsigned int uX, unsigned int uY, unsigned int uWidth, unsigned int uHeight, int a6, int a7, unsigned int uControlID, unsigned int uControlParam, unsigned __int8 uHotkey, const char *pName, Texture *pTextures, ...);
Ritor1
parents:
diff changeset
65 void DrawFlashingInputCursor(signed int a3, int a4, struct GUIFont *a2);
Ritor1
parents:
diff changeset
66 int DrawTextInRect(GUIFont *a2, unsigned int uX, unsigned int uY, unsigned int uColor, const char *Str1, int Source, int a8);
Ritor1
parents:
diff changeset
67 char DrawText(GUIFont *a2, signed int uX, int uY, unsigned int uFontColor, const char *Str, int a7, int a8, unsigned int uFontShadowColor);
Ritor1
parents:
diff changeset
68 char *DrawTitleText(GUIFont *a2, unsigned int uHorizontalMargin, unsigned int uVerticalMargin, unsigned __int16 uDefaultColor, const char *pInString, unsigned int uLineSpacing);
Ritor1
parents:
diff changeset
69 char *_4B1854(__int64 a2);
Ritor1
parents:
diff changeset
70 void _4B3157();
Ritor1
parents:
diff changeset
71 GUIButton *_411621();
Ritor1
parents:
diff changeset
72 void InitializeBookView();
Ritor1
parents:
diff changeset
73 void DrawMessageBox(int arg0);
Ritor1
parents:
diff changeset
74 GUIButton *GetControl(unsigned int uID);
Ritor1
parents:
diff changeset
75 void Release();
Ritor1
parents:
diff changeset
76 void _41D08F(int a2, int a3, int a4, int a5);
Ritor1
parents:
diff changeset
77 char DrawQuickCharRecord();
Ritor1
parents:
diff changeset
78 char _41D73D_draw_buff_tooltip();
Ritor1
parents:
diff changeset
79
Ritor1
parents:
diff changeset
80 static GUIWindow *Create(unsigned int uX, unsigned int uY, unsigned int uWidth, unsigned int uHeight, enum WindowType eType, int a4, int a5);
Ritor1
parents:
diff changeset
81
Ritor1
parents:
diff changeset
82 unsigned int uFrameX;
Ritor1
parents:
diff changeset
83 unsigned int uFrameY;
Ritor1
parents:
diff changeset
84 unsigned int uFrameWidth;
Ritor1
parents:
diff changeset
85 unsigned int uFrameHeight;
Ritor1
parents:
diff changeset
86 unsigned int uFrameZ;
Ritor1
parents:
diff changeset
87 unsigned int uFrameW;
Ritor1
parents:
diff changeset
88 WindowType eWindowType;
Ritor1
parents:
diff changeset
89 void *ptr_1C;
Ritor1
parents:
diff changeset
90 unsigned int uNumControls;
Ritor1
parents:
diff changeset
91 int field_24;
Ritor1
parents:
diff changeset
92 int pNumPresenceButton;
Ritor1
parents:
diff changeset
93 int pCurrentPosActiveItem;
Ritor1
parents:
diff changeset
94 int field_30;
Ritor1
parents:
diff changeset
95 int field_34;
Ritor1
parents:
diff changeset
96 int pStartingPosActiveItem;
Ritor1
parents:
diff changeset
97 int field_3C;
Ritor1
parents:
diff changeset
98 int field_40;
Ritor1
parents:
diff changeset
99 int field_44;
Ritor1
parents:
diff changeset
100 char *Hint;
Ritor1
parents:
diff changeset
101 GUIButton *pControlsHead;
Ritor1
parents:
diff changeset
102 GUIButton *pControlsTail;
Ritor1
parents:
diff changeset
103 };
Ritor1
parents:
diff changeset
104 #pragma pack(pop)
Ritor1
parents:
diff changeset
105
Ritor1
parents:
diff changeset
106
Ritor1
parents:
diff changeset
107
Ritor1
parents:
diff changeset
108
Ritor1
parents:
diff changeset
109
Ritor1
parents:
diff changeset
110
Ritor1
parents:
diff changeset
111 /* 296 */
Ritor1
parents:
diff changeset
112 enum UIMessageType
Ritor1
parents:
diff changeset
113 {
Ritor1
parents:
diff changeset
114 UIMSG_00 = 0x0,
Ritor1
parents:
diff changeset
115 UIMSG_ChangeGameState = 0x5,
3
bf31c505f4d3 13.01.13(MainMenuMessageProc())
Ritor1
parents: 2
diff changeset
116 UIMSG_11 = 0x11,
0
Ritor1
parents:
diff changeset
117 UIMSG_PlayArcomage = 0x1D,
Ritor1
parents:
diff changeset
118 UIMSG_MainMenu_ShowPartyCreationWnd = 0x36,
Ritor1
parents:
diff changeset
119 UIMSG_MainMenu_ShowLoadWindow = 0x37,
Ritor1
parents:
diff changeset
120 UIMSG_ShowCredits = 0x38,
Ritor1
parents:
diff changeset
121 UIMSG_ExitToWindows = 0x39,
3
bf31c505f4d3 13.01.13(MainMenuMessageProc())
Ritor1
parents: 2
diff changeset
122 UIMSG_3A = 0x3A,
bf31c505f4d3 13.01.13(MainMenuMessageProc())
Ritor1
parents: 2
diff changeset
123 UIMSG_PlayerCreationChangeName = 0x3C,
0
Ritor1
parents:
diff changeset
124 UIMSG_PlayerCreationClickPlus = 0x3E,
Ritor1
parents:
diff changeset
125 UIMSG_PlayerCreationClickMinus = 0x3F,
Ritor1
parents:
diff changeset
126 UIMSG_PlayerCreationSelectActiveSkill = 0x40,
Ritor1
parents:
diff changeset
127 UIMSG_PlayerCreationSelectClass = 0x41,
Ritor1
parents:
diff changeset
128 UIMSG_PlayerCreationClickOK = 0x42,
Ritor1
parents:
diff changeset
129 UIMSG_PlayerCreationClickReset = 0x43,
Ritor1
parents:
diff changeset
130 UIMSG_PlayerCreationRemoveUpSkill = 0x4A,
Ritor1
parents:
diff changeset
131 UIMSG_PlayerCreationRemoveDownSkill = 0x4B,
Ritor1
parents:
diff changeset
132 UIMSG_4B = 0x4B,
Ritor1
parents:
diff changeset
133 UIMSG_LoadGame = 0x52,
Ritor1
parents:
diff changeset
134 UIMSG_SaveGame = 0x53,
Ritor1
parents:
diff changeset
135 UIMSG_ShowStatus_DateTime = 0x5C,
Ritor1
parents:
diff changeset
136 UIMSG_ShowStatus_ManaHP = 0x5D,
Ritor1
parents:
diff changeset
137 UIMSG_ShowStatus_Player = 0x5E,
Ritor1
parents:
diff changeset
138 UIMSG_ShowStatus_Food = 0x64,
Ritor1
parents:
diff changeset
139 UIMSG_ShowStatus_Funds = 0x65,
Ritor1
parents:
diff changeset
140 UIMSG_6B = 0x6B,
Ritor1
parents:
diff changeset
141 UIMSG_SelectCharacter = 0x6E,
Ritor1
parents:
diff changeset
142 UIMSG_ChangeSoundVolume = 0x6F,
Ritor1
parents:
diff changeset
143 UIMSG_ChangeMusicVolume = 0x70,
3
bf31c505f4d3 13.01.13(MainMenuMessageProc())
Ritor1
parents: 2
diff changeset
144 UIMSG_Escape = 0x71,
0
Ritor1
parents:
diff changeset
145 UIMSG_PlayerCreationSelectQuality = 0x76,
Ritor1
parents:
diff changeset
146 UIMSG_SkillUp = 0x79,
Ritor1
parents:
diff changeset
147 UIMSG_StartNewGame = 0x7C,
Ritor1
parents:
diff changeset
148 UIMSG_Game_OpenLoadGameDialog = 0x7D,
Ritor1
parents:
diff changeset
149 UIMSG_Game_OpenOptionsDialog = 0x7F,
Ritor1
parents:
diff changeset
150 UIMSG_SetGraphicsMode = 0x83,
Ritor1
parents:
diff changeset
151 UIMSG_Quit = 0x84,
Ritor1
parents:
diff changeset
152 UIMSG_PlayerCreationVoiceBack = 0x90,
Ritor1
parents:
diff changeset
153 UIMSG_PlayerCreationVoiceForward = 0x91,
Ritor1
parents:
diff changeset
154 UIMSG_StartNPCDialogue = 0xA1,
2
89240115d392 MainMenuBtn(work)
Ritor1
parents: 0
diff changeset
155 UIMSG_ArrowUp = 0xA2,
89240115d392 MainMenuBtn(work)
Ritor1
parents: 0
diff changeset
156 UIMSG_DownArrow = 0xA3,
89240115d392 MainMenuBtn(work)
Ritor1
parents: 0
diff changeset
157 UIMSG_LoadSlot = 0xA4,
3
bf31c505f4d3 13.01.13(MainMenuMessageProc())
Ritor1
parents: 2
diff changeset
158 UIMSG_SelectLoadSlot = 0xA5,
2
89240115d392 MainMenuBtn(work)
Ritor1
parents: 0
diff changeset
159 UIMSG_Cancel = 0xA6,
0
Ritor1
parents:
diff changeset
160 UIMSG_A7 = 0xA7,
Ritor1
parents:
diff changeset
161 UIMSG_A8 = 0xA8,
Ritor1
parents:
diff changeset
162 UIMSG_A9 = 0xA9,
Ritor1
parents:
diff changeset
163 UIMSG_AA = 0xAA,
Ritor1
parents:
diff changeset
164 UIMSG_SelectFacePlayerBack = 0xAB,
Ritor1
parents:
diff changeset
165 UIMSG_SelectFacePlayerForward = 0xAC,
Ritor1
parents:
diff changeset
166 UIMSG_AD = 0xAD,
Ritor1
parents:
diff changeset
167 UIMSG_AE = 0xAE,
Ritor1
parents:
diff changeset
168 UIMSG_AF = 0xAF,
Ritor1
parents:
diff changeset
169 UIMSG_CycleCharacters = 0xB0,
Ritor1
parents:
diff changeset
170 UIMSG_B1 = 0xB1,
Ritor1
parents:
diff changeset
171 UIMSG_B2 = 0xB2,
Ritor1
parents:
diff changeset
172 UIMSG_B3 = 0xB3,
Ritor1
parents:
diff changeset
173 UIMSG_B4 = 0xB4,
Ritor1
parents:
diff changeset
174 UIMSG_B5 = 0xB5,
Ritor1
parents:
diff changeset
175 UIMSG_B6 = 0xB6,
Ritor1
parents:
diff changeset
176 UIMSG_B7 = 0xB7,
Ritor1
parents:
diff changeset
177 UIMSG_SetTurnSpeed = 0xB8,
Ritor1
parents:
diff changeset
178 UIMSG_ToggleWalkSound = 0xB9,
Ritor1
parents:
diff changeset
179 UIMSG_ChangeVoiceVolume = 0xBA,
Ritor1
parents:
diff changeset
180 UIMSG_ToggleShowDamage = 0xBB,
Ritor1
parents:
diff changeset
181 UIMSG_BC = 0xBC,
Ritor1
parents:
diff changeset
182 UIMSG_BD = 0xBD,
Ritor1
parents:
diff changeset
183 UIMSG_BE = 0xBE,
Ritor1
parents:
diff changeset
184 UIMSG_BF = 0xBF,
Ritor1
parents:
diff changeset
185 UIMSG_C0 = 0xC0,
Ritor1
parents:
diff changeset
186 UIMSG_C1 = 0xC1,
Ritor1
parents:
diff changeset
187 UIMSG_C2 = 0xC2,
Ritor1
parents:
diff changeset
188 UIMSG_C3 = 0xC3,
Ritor1
parents:
diff changeset
189 UIMSG_C4 = 0xC4,
Ritor1
parents:
diff changeset
190 UIMSG_ShowFinalWindow = 0xC5,
Ritor1
parents:
diff changeset
191 UIMSG_C6 = 0xC6,
Ritor1
parents:
diff changeset
192 UIMSG_C7 = 0xC7,
Ritor1
parents:
diff changeset
193 UIMSG_OpenQuestBook = 0xC8,
Ritor1
parents:
diff changeset
194 UIMSG_OpenAutonotes = 0xC9,
Ritor1
parents:
diff changeset
195 UIMSG_OpenMapBook = 0xCA,
Ritor1
parents:
diff changeset
196 UIMSG_OpenCalendar = 0xCB,
Ritor1
parents:
diff changeset
197 UIMSG_CC = 0xCC,
Ritor1
parents:
diff changeset
198 UIMSG_CD = 0xCD,
Ritor1
parents:
diff changeset
199 UIMSG_CE = 0xCE,
Ritor1
parents:
diff changeset
200 UIMSG_CF = 0xCF,
Ritor1
parents:
diff changeset
201 UIMSG_D0 = 0xD0,
Ritor1
parents:
diff changeset
202 UIMSG_D1 = 0xD1,
Ritor1
parents:
diff changeset
203 UIMSG_D2 = 0xD2,
Ritor1
parents:
diff changeset
204 UIMSG_D3 = 0xD3,
Ritor1
parents:
diff changeset
205 UIMSG_D4 = 0xD4,
Ritor1
parents:
diff changeset
206 UIMSG_D5 = 0xD5,
Ritor1
parents:
diff changeset
207 UIMSG_D6 = 0xD6,
Ritor1
parents:
diff changeset
208 UIMSG_OpenHistoryBook = 0xE0,
Ritor1
parents:
diff changeset
209 UIMSG_ToggleAlwaysRun = 0xE1,
Ritor1
parents:
diff changeset
210 UIMSG_ToggleFlipOnExit = 0xE2,
Ritor1
parents:
diff changeset
211 UIMSG_OpenRestUI = 0x199,
Ritor1
parents:
diff changeset
212 UIMSG_OpenKeyMappingOptions = 0x19F,
Ritor1
parents:
diff changeset
213 UIMSG_ResetKeyMapping = 0x1A2,
Ritor1
parents:
diff changeset
214 UIMSG_OpenVideoOptions = 0x1A5,
Ritor1
parents:
diff changeset
215 UIMSG_ToggleBloodsplats = 0x1A6,
Ritor1
parents:
diff changeset
216 UIMSG_ToggleColoredLights = 0x1A7,
Ritor1
parents:
diff changeset
217 UIMSG_ToggleTint = 0x1A8,
Ritor1
parents:
diff changeset
218 };
Ritor1
parents:
diff changeset
219
Ritor1
parents:
diff changeset
220
Ritor1
parents:
diff changeset
221
Ritor1
parents:
diff changeset
222
Ritor1
parents:
diff changeset
223
Ritor1
parents:
diff changeset
224
Ritor1
parents:
diff changeset
225 /* 249 */
Ritor1
parents:
diff changeset
226 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
227 struct GUIMessage
Ritor1
parents:
diff changeset
228 {
Ritor1
parents:
diff changeset
229 enum UIMessageType eType;
Ritor1
parents:
diff changeset
230 int param;
Ritor1
parents:
diff changeset
231 int field_8;
Ritor1
parents:
diff changeset
232 };
Ritor1
parents:
diff changeset
233 #pragma pack(pop)
Ritor1
parents:
diff changeset
234
Ritor1
parents:
diff changeset
235
Ritor1
parents:
diff changeset
236
Ritor1
parents:
diff changeset
237
Ritor1
parents:
diff changeset
238
Ritor1
parents:
diff changeset
239 /* 250 */
Ritor1
parents:
diff changeset
240 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
241 struct GUIMessageQueue
Ritor1
parents:
diff changeset
242 {
Ritor1
parents:
diff changeset
243 inline GUIMessageQueue():
Ritor1
parents:
diff changeset
244 uNumMessages(0)
Ritor1
parents:
diff changeset
245 {}
Ritor1
parents:
diff changeset
246
Ritor1
parents:
diff changeset
247 void PopMessage(UIMessageType *pMsg, int *pParam, int *a4);
Ritor1
parents:
diff changeset
248 void SendMessage(UIMessageType msg, int param, unsigned int a4);
Ritor1
parents:
diff changeset
249
Ritor1
parents:
diff changeset
250 unsigned int uNumMessages;
Ritor1
parents:
diff changeset
251 GUIMessage pMessages[40];
Ritor1
parents:
diff changeset
252 };
Ritor1
parents:
diff changeset
253 #pragma pack(pop)
Ritor1
parents:
diff changeset
254
Ritor1
parents:
diff changeset
255 extern struct GUIMessageQueue *pMessageQueue_50CBD0; // idb
Ritor1
parents:
diff changeset
256
Ritor1
parents:
diff changeset
257
Ritor1
parents:
diff changeset
258
Ritor1
parents:
diff changeset
259
Ritor1
parents:
diff changeset
260 extern int pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[]; // idb
Ritor1
parents:
diff changeset
261 extern struct GUIWindow *pWindow_MainMenu;
Ritor1
parents:
diff changeset
262 extern struct GUIWindow pWindowList[20];