comparison GUI/GUIWindow.h @ 2502:a77c34acdbc9

Media folder
author Ritor1
date Fri, 19 Sep 2014 05:13:32 +0600
parents
children e72e62ec9273
comparison
equal deleted inserted replaced
2501:0ff6a9e9bf7f 2502:a77c34acdbc9
1 #pragma once
2
3 #include <cstdint>
4 #include <array>
5
6 #include "Engine/Objects/Player.h"
7
8 enum UIMessageType: unsigned __int32
9 {
10 UIMSG_0 = 0,
11
12 UIMSG_ChangeGameState = 5,
13
14 UIMSG_MouseLeftClickInGame = 10,
15
16 UIMSG_CHEST_ClickItem = 12,
17
18 UIMSG_MouseLeftClickInScreen = 14,
19 UIMSG_F = 15,
20
21 UIMSG_ChangeCursor = 17,
22
23 UIMSG_Attack = 23,
24
25 UIMSG_CastQuickSpell = 25,
26
27 UIMSG_STEALFROMACTOR = 27,
28 UIMSG_1C = 28,
29 UIMSG_PlayArcomage = 29,
30
31 UIMSG_31 = 49,
32 UIMSG_32 = 50,
33 UIMSG_SpellBook_PressTab = 51,
34 UIMSG_34 = 52,
35 UIMSG_35 = 53,
36 UIMSG_MainMenu_ShowPartyCreationWnd = 54,
37 UIMSG_MainMenu_ShowLoadWindow = 55,
38 UIMSG_ShowCredits = 56,
39 UIMSG_ExitToWindows = 57,
40 UIMSG_3A = 58,
41
42 UIMSG_PlayerCreationChangeName = 60,
43
44 UIMSG_PlayerCreationClickPlus = 62,
45 UIMSG_PlayerCreationClickMinus = 63,
46 UIMSG_PlayerCreationSelectActiveSkill = 64,
47 UIMSG_PlayerCreationSelectClass = 65,
48 UIMSG_PlayerCreationClickOK = 66,
49 UIMSG_PlayerCreationClickReset = 67,
50 UIMSG_44 = 68,
51 UIMSG_CastSpell_Character_Big_Improvement = 69,
52 UIMSG_CastSpell_Shoot_Monster = 70,
53 UIMSG_ClickBooksBtn = 71,
54 UIMSG_48 = 72,
55 UIMSG_49 = 73,
56 UIMSG_PlayerCreationRemoveUpSkill = 74,
57 UIMSG_PlayerCreationRemoveDownSkill = 75,
58
59 UIMSG_HintSelectRemoveQuickSpellBtn = 78,
60 UIMSG_SPellbook_ShowHightlightedSpellInfo = 79,
61
62 UIMSG_BuyInShop_Identify_Repair = 81,
63 UIMSG_LoadGame = 82,
64 UIMSG_SaveGame = 83,
65 UIMSG_54 = 84,
66 UIMSG_ChangeDetaliz = 85,
67 UIMSG_SelectSpell = 86,
68 UIMSG_OpenSpellbookPage = 87,
69 UIMSG_ClickInstallRemoveQuickSpellBtn = 88,
70
71 UIMSG_OnTravelByFoot = 90,
72 UIMSG_CHANGE_LOCATION_ClickCencelBtn = 91,
73 UIMSG_ShowStatus_DateTime = 92,
74 UIMSG_ShowStatus_ManaHP = 93,
75 UIMSG_ShowStatus_Player = 94,
76 UIMSG_Wait5Minutes = 95,
77 UIMSG_Wait1Hour = 96,
78 UIMSG_Rest8Hour = 97,
79
80 UIMSG_ShowStatus_Food = 100,
81 UIMSG_ShowStatus_Funds = 101,
82
83 UIMSG_RestWindow = 104,
84 UIMSG_SpellBookWindow = 105,
85 UIMSG_QuickReference = 106,
86 UIMSG_GameMenuButton = 107,
87
88 UIMSG_AlreadyResting = 109,
89 UIMSG_SelectCharacter = 110,
90 UIMSG_ChangeSoundVolume = 111,
91 UIMSG_ChangeMusicVolume = 112,
92 UIMSG_Escape = 113,
93 UIMSG_ClickSkillsBtn = 114,
94 UIMSG_ClickStatsBtn = 115,
95 UIMSG_ClickInventoryBtn = 116,
96 UIMSG_ClickAwardsBtn = 117,
97 UIMSG_PlayerCreation_SelectAttribute = 118,
98
99 UIMSG_InventoryLeftClick = 120,
100 UIMSG_SkillUp = 121,
101 UIMSG_7A = 122,
102 UIMSG_GameMenu_ReturnToGame = 123,
103 UIMSG_StartNewGame = 124,
104 UIMSG_Game_OpenLoadGameDialog = 125,
105 UIMSG_Game_OpenSaveGameDialog = 126,
106 UIMSG_Game_OpenOptionsDialog = 127,
107 UIMSG_80 = 128,
108
109 UIMSG_SetGraphicsMode = 131,
110 UIMSG_Quit = 132,
111 UIMSG_ClickPaperdoll = 133,
112 UIMSG_StartHireling1Dialogue = 134,
113 UIMSG_StartHireling2Dialogue = 135,
114 UIMSG_SelectNPCDialogueOption = 136,
115
116 UIMSG_CastSpell_Monster_Improvement = 140,
117 UIMSG_CastSpell_Character_Small_Improvement = 141,
118 UIMSG_CastSpellFromBook = 142,
119 UIMSG_HiredNPC_CastSpell = 143,
120 UIMSG_PlayerCreation_VoicePrev = 144,
121 UIMSG_PlayerCreation_VoiceNext = 145,
122 UIMSG_SpellScrollUse = 146,
123
124 UIMSG_StartNPCDialogue = 161,
125 UIMSG_ArrowUp = 162,
126 UIMSG_DownArrow = 163,
127 UIMSG_SaveLoadBtn = 164,
128 UIMSG_SelectLoadSlot = 165,
129 UIMSG_Cancel = 166,
130 UIMSG_ExitRest = 167,
131 UIMSG_ClickExitCharacterWindowBtn = 168,
132 UIMSG_ClickAwardsUpBtn = 169,
133 UIMSG_ClickAwardsDownBtn = 170,
134 UIMSG_PlayerCreation_FacePrev = 171,
135 UIMSG_PlayerCreation_FaceNext = 172,
136 UIMSG_AD = 173,
137 UIMSG_AE = 174,
138 UIMSG_ClickNPCTopic = 175,
139 UIMSG_CycleCharacters = 176,
140 UIMSG_OnCastLloydsBeacon = 177,
141 UIMSG_LloydsBeacon_FlippingBtn = 178,
142 UIMSG_InstallBeacon = 179,
143 UIMSG_HintBeaconSlot = 180,
144 UIMSG_CloseAfterInstallBeacon = 181,
145 UIMSG_HintTownPortal = 182,
146 UIMSG_ClickTownInTP = 183,
147 UIMSG_SetTurnSpeed = 184,
148 UIMSG_ToggleWalkSound = 185,
149 UIMSG_ChangeVoiceVolume = 186,
150 UIMSG_ToggleShowDamage = 187,
151 UIMSG_ScrollNPCPanel = 188,
152 UIMSG_BD = 189,
153 UIMSG_CastSpell_Telekinesis = 190,
154 UIMSG_BF = 191,
155 UIMSG_ClickAwardScrollBar = 192,
156 UIMSG_C1 = 192,
157 UIMSG_C2 = 192,
158
159 UIMSG_OnCastTownPortal = 195,
160 UIMSG_OnFinalWindowClose = 196,
161 UIMSG_ShowFinalWindow = 197,
162 UIMSG_C6 = 198,
163 UIMSG_C7 = 199,
164 UIMSG_OpenQuestBook = 200,
165 UIMSG_OpenAutonotes = 201,
166 UIMSG_OpenMapBook = 202,
167 UIMSG_OpenCalendar = 203,
168 UIMSG_CC = 204,
169 UIMSG_CD = 205,
170 UIMSG_CE = 206,
171 UIMSG_CF = 207,
172 UIMSG_D0 = 208,
173 UIMSG_D1 = 209,
174 UIMSG_D2 = 210,
175 UIMSG_D3 = 211,
176 UIMSG_D4 = 212,
177 UIMSG_D5 = 213,
178 UIMSG_D6 = 214,
179
180 UIMSG_DD = 221,
181
182 UIMSG_OpenHistoryBook = 224,
183 UIMSG_ToggleAlwaysRun = 225,
184 UIMSG_ToggleFlipOnExit = 226,
185
186 UIMSG_ClickZoomOutBtn = 367,
187 UIMSG_ClickZoomInBtn = 368,
188
189 UIMSG_Game_Action = 404,
190 UIMSG_SelectShopDialogueOption = 405,
191
192 UIMSG_RentRoom = 409,
193 UIMSG_ClickHouseNPCPortrait = 410,
194 UIMSG_TransitionUI_Confirm = 411,
195 UIMSG_TransitionWindowCloseBtn = 412,
196
197 UIMSG_OpenKeyMappingOptions = 415,
198 UIMSG_SelectKeyPage1 = 416,
199 UIMSG_SelectKeyPage2 = 417,
200 UIMSG_ResetKeyMapping = 418,
201 UIMSG_ChangeKeyButton = 419,
202
203 UIMSG_OpenVideoOptions = 421,
204 UIMSG_ToggleBloodsplats = 422,
205 UIMSG_ToggleColoredLights = 423,
206 UIMSG_ToggleTint = 424,
207 UIMSG_1A9 = 425,
208
209 UIMSG_MMT_MainMenu_MM6 = 426,
210 UIMSG_MMT_MainMenu_MM7 = 427,
211 UIMSG_MMT_MainMenu_MM8 = 428,
212 UIMSG_MMT_MainMenu_Continue = 429,
213
214 };
215
216
217 /* 251 */
218 enum MENU_STATE : __int32
219 {
220 MENU_MAIN = 0,
221 MENU_NEWGAME = 1,
222 MENU_CREDITS = 2,
223 MENU_SAVELOAD = 3,
224 MENU_EXIT_GAME = 4,
225 MENU_5 = 5,
226 MENU_CREATEPARTY = 6,
227 MENU_NAMEPANELESC = 7,
228 MENU_CREDITSPROC = 8,
229 MENU_LoadingProcInMainMenu = 9,
230 MENU_DebugBLVLevel = 10,
231 MENU_CREDITSCLOSE = 11,
232 MENU_MMT_MAIN_MENU = 12,
233 };
234
235
236 enum DIALOGUE_TYPE
237 {
238 DIALOGUE_USE_NPC_ABILITY = 9,
239 DIALOGUE_13 = 0xD,
240 DIALOGUE_18 = 18,
241 DIALOGUE_EVT_A = 19,
242 DIALOGUE_EVT_B = 20,
243 DIALOGUE_EVT_C = 21,
244 DIALOGUE_EVT_D = 22,
245 DIALOGUE_EVT_E = 23,
246 DIALOGUE_EVT_F = 0x18,
247 DIALOGUE_76 = 76,
248 DIALOGUE_PROFESSION_DETAILS = 77,
249 DIALOGUE_SKILL_TRAINER = 78,
250 DIALOGUE_84 = 84,
251 DIALOGUE_ARENA_SELECT_PAGE = 85,
252 DIALOGUE_ARENA_SELECT_SQUIRE = 86,
253 DIALOGUE_ARENA_SELECT_KNIGHT = 87,
254 DIALOGUE_ARENA_SELECT_CHAMPION = 88,
255 DIALOGUE_ARENA_WELCOME = 89,
256 DIALOGUE_ARENA_FIGHT_NOT_OVER_YET = 90,
257 DIALOGUE_ARENA_REWARD = 91,
258 DIALOGUE_ARENA_ALREADY_WON = 92,
259 };
260
261
262
263
264
265 /* 298 */
266 enum WindowType: unsigned __int32
267 {
268 WINDOW_null = 0,
269 WINDOW_MainMenu = 1,
270 WINDOW_OptionsButtons = 3,
271 WINDOW_CharacterRecord = 4,
272 WINDOW_Options = 6,
273 WINDOW_8 = 8,
274 WINDOW_Book = 9,
275 WINDOW_Dialogue = 10,
276 WINDOW_QuickReference = 12,
277 WINDOW_F = 15,
278 WINDOW_Rest = 16,
279 WINDOW_ChangeLocation = 17,
280 WINDOW_SpellBook = 18,
281 WINDOW_GreetingNPC = 19,
282 WINDOW_Chest = 20,
283 WINDOW_22 = 0x16,
284 WINDOW_SaveLoadButtons = 23,
285 WINDOW_MainMenu_Load = 0x18,
286 WINDOW_HouseInterior = 0x19,
287 WINDOW_Transition = 26,
288 WINDOW_CastSpell = 27,
289 WINDOW_Scroll = 0x1E,
290 WINDOW_CastSpell_InInventory = 31,
291 WINDOW_ModalWindow = 70,
292 WINDOW_50 = 80,
293 WINDOW_59 = 89,
294 WINDOW_PressedButton2 = 90,
295 WINDOW_CharactersPressedButton = 91,
296 WINDOW_PressedButton = 92,
297 WINDOW_5D = 93,
298 WINDOW_SaveLoadBtn = 94,
299 WINDOW_LoadGame_CancelBtn = 95,
300 WINDOW_CloseRestWindowBtn = 96,
301 WINDOW_ExitCharacterWindow = 97,
302 WINDOW_RestWindow = 0x62,
303 WINDOW_BooksWindow = 99,
304 WINDOW_CharacterWindow_Stats = 0x64,
305 WINDOW_CharacterWindow_Skills = 0x65,
306 WINDOW_CharacterWindow_Awards = 0x66,
307 WINDOW_CharacterWindow_Inventory = 0x67,
308 WINDOW_68 = 104,
309 WINDOW_KeyMappingOptions = 0x69,
310 WINDOW_VideoOptions = 0x6A,
311 WINDOW_LloydsBeacon = 177,
312 WINDOW_TownPortal = 195,
313 WINDOW_QuestBook = 200,
314 WINDOW_AutonotesBook = 0xC9,
315 WINDOW_MapsBook = 0xCA,
316 WINDOW_CalendarBook = 0xCB,
317 WINDOW_JournalBook = 0xE0,
318 };
319
320 struct GUIButton;
321 struct Texture;
322
323
324 #define WINDOW_INPUT_NONE 0
325 #define WINDOW_INPUT_IN_PROGRESS 1
326 #define WINDOW_INPUT_CONFIRMED 2
327 #define WINDOW_INPUT_CANCELLED 3
328
329 /* 155 */
330 #pragma pack(push, 1)
331 struct GUIWindow
332 {
333 inline GUIWindow()
334 {
335 pControlsHead = pControlsTail = nullptr;
336 eWindowType = WINDOW_null;
337 }
338
339 GUIButton *CreateButton(unsigned int uX, unsigned int uY, unsigned int uWidth, unsigned int uHeight, int a6, int a7,
340 UIMessageType msg, unsigned int msg_param, unsigned __int8 uHotkey, const char *pName, struct Texture *pTextures, ...);
341 void DrawFlashingInputCursor(signed int uX, int uY, struct GUIFont *a2);
342 int DrawTextInRect(GUIFont *pFont, unsigned int uX, unsigned int uY, unsigned int uColor, const char *text, int rect_width, int reverse_text);
343 void DrawText(GUIFont *a2, signed int uX, int uY, unsigned int uFontColor, const char *Str, int a7, int a8, signed int uFontShadowColor);
344 void DrawTitleText(GUIFont *a2, signed int uHorizontalMargin, unsigned int uVerticalMargin, unsigned __int16 uDefaultColor, const char *pInString, unsigned int uLineSpacing);
345 void DrawShops_next_generation_time_string(__int64 next_generation_time);
346 void HouseDialogManager();
347 void OpenSpellBook();
348 void InitializeBookView();
349 void DrawMessageBox(int arg0);
350 GUIButton *GetControl(unsigned int uID);
351 void Release();
352 void _41D08F_set_keyboard_control_group(int num_buttons, int a3, int a4, int a5);
353 void _41D73D_draw_buff_tooltip();
354
355 static GUIWindow *Create(unsigned int uX, unsigned int uY, unsigned int uWidth, unsigned int uHeight, enum WindowType eWindowType, int pButton, const char* hint);
356
357 unsigned int uFrameX;
358 unsigned int uFrameY;
359 unsigned int uFrameWidth;
360 unsigned int uFrameHeight;
361 unsigned int uFrameZ;
362 unsigned int uFrameW;
363 WindowType eWindowType;
364 union{
365 void *ptr_1C;// sometimes BuildID_2Events
366 unsigned int par1C;
367 };
368 unsigned int uNumControls;
369 int field_24;
370 int pNumPresenceButton;
371 int pCurrentPosActiveItem;
372 int field_30;
373 int field_34;
374 int pStartingPosActiveItem;
375 int numVisibleWindows;
376 int receives_keyboard_input_2; // 0 no input 1 currently typing 2 enter pressed 3 escape pressed
377 int receives_keyboard_input;
378 const char *Hint;
379 GUIButton *pControlsHead;
380 GUIButton *pControlsTail;
381 };
382 #pragma pack(pop)
383
384
385
386
387
388
389
390
391 enum CURRENT_SCREEN
392 {
393 SCREEN_GAME = 0x0,
394 SCREEN_MENU = 0x1,
395 SCREEN_OPTIONS = 0x2,
396 SCREEN_BOOKS = 0x3,
397 SCREEN_NPC_DIALOGUE = 0x4,
398 SCREEN_REST = 0x5,
399 SCREEN_CHARACTERS = 0x7,
400 SCREEN_SPELL_BOOK = 0x8,
401 SCREEN_CREATORS = 0x9,
402 SCREEN_CHEST = 0xA,
403 SCREEN_SAVEGAME = 0xB,
404 SCREEN_LOADGAME = 0xC,
405 SCREEN_HOUSE = 0xD,
406 SCREEN_E = 0xE,
407 SCREEN_CHEST_INVENTORY = 0xF,
408 SCREEN_VIDEO = 0x10,
409 SCREEN_CHANGE_LOCATION = 0x11,
410 SCREEN_INPUT_BLV = 0x12,
411 SCREEN_BRANCHLESS_NPC_DIALOG = 0x13,
412 SCREEN_PARTY_CREATION = 0x15,
413 SCREEN_MODAL_WINDOW = 0x16,
414 SCREEN_CASTING = 0x17,
415 SCREEN_19 = 0x19,
416 SCREEN_KEYBOARD_OPTIONS = 0x1A,
417 SCREEN_1B = 0x1B,
418 SCREEN_VIDEO_OPTIONS = 0x1C,
419 SCREEN_63 = 0x63,
420 SCREEN_64 = 0x64,
421 SCREEN_67 = 0x67,
422 SCREEN_QUICK_REFERENCE = 0x68,
423 };
424
425
426
427
428 /* 249 */
429 #pragma pack(push, 1)
430 struct GUIMessage
431 {
432 enum UIMessageType eType;
433 int param;
434 int field_8;
435 };
436 #pragma pack(pop)
437
438
439
440
441 #define AddGUIMessage(msg, param, a4) AddMessageImpl((msg), (param), (a4), __FILE__, __LINE__)
442 /* 250 */
443 #pragma pack(push, 1)
444 struct GUIMessageQueue
445 {
446 inline GUIMessageQueue():
447 uNumMessages(0)
448 {}
449
450 void Flush();
451 void PopMessage(UIMessageType *pMsg, int *pParam, int *a4);
452 void AddMessageImpl(UIMessageType msg, int param, unsigned int a4, const char *file = nullptr, int line = 0);
453
454 unsigned int uNumMessages;
455 GUIMessage pMessages[40];
456
457 const char *files[40];
458 int lines[40];
459 };
460 #pragma pack(pop)
461
462 extern struct GUIMessageQueue *pMessageQueue_50CBD0; // idb
463
464 extern struct GUIMessageQueue *pMessageQueue_50C9E8; // idb
465
466
467
468 void OnSelectNPCDialogueOption(DIALOGUE_TYPE newDialogueType);
469
470
471
472 extern int pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[]; // idb
473 extern struct GUIWindow *pWindow_MMT_MainMenu;
474 extern struct GUIWindow *pWindow_MainMenu;
475 extern std::array<struct GUIWindow, 20> pWindowList;
476
477
478
479
480 void ModalWindow(const char *pStrHint, UIMessageType OnRelease_message);
481 void ModalWindow_ShowHint();
482 void ModalWindow_Release();
483
484
485
486 void draw_leather();
487
488
489 // main menu ui
490 void MainMenuUI_LoadFontsAndSomeStuff();
491 void MainMenuUI_Create();
492 MENU_STATE MainMenuUI_Credits_Loop();
493
494 // save & load ui
495 void SaveUI_Load();
496 void SaveUI_Draw();
497
498 void LoadUI_Draw();
499 void LoadUI_Load(unsigned int uDialogueType); // idb
500
501 // game ui
502 void GameUI_DrawRightPanel();
503 void GameUI_DrawRightPanelFrames();
504 void GameUI_DrawRightPanelItems();
505 void GameUI_QuickRef_Draw();
506 void GameUI_DrawFoodAndGold();
507 void GameUI_DrawLifeManaBars();
508 void GameUI_DrawHiredNPCs();
509 void GameUI_DrawPortraits(unsigned int _this);
510 void GameUI_Footer();
511 void GameUI_Footer_2();
512 void GameUI_SetFooterString(const char *pStr);
513 void GameUI_DrawMinimap(unsigned int uX, unsigned int uY, unsigned int uZ, unsigned int uW, unsigned int uZoom, unsigned int bRedrawOdmMinimap);
514 auto GameUI_GetMinimapHintText() -> const char *;
515 void GameUI_DrawPartySpells();
516 void GameUI_DrawTorchlightAndWizardEye();
517 void GameUI_DrawCharacterSelectionFrame();
518 void GameUI_CharacterQuickRecord_Draw(GUIWindow *window, Player *player);
519 void GameUI_DrawNPCPopup(void *_this);
520
521 void GameUI_InitializeDialogue(struct Actor *actor, int bPlayerSaysHello);
522 void GameUI_DrawBranchlessDialogue();
523 void GameUI_DrawDialogue();
524
525
526 // game menu ui
527 void GameMenuUI_DrawKeyBindings();
528 void GameMenuUI_DrawVideoOptions();
529 void GameMenuUI_Options_Draw();
530
531
532
533
534 // character ui
535 struct GUIWindow *CharacterUI_Initialize(unsigned int _this);
536 const char *CharacterUI_GetSkillDescText(unsigned int uPlayerID, PLAYER_SKILL_TYPE uPlayerSkillType);
537 void CharacterUI_SkillsTab_ShowHint();
538 void CharacterUI_StatsTab_ShowHint();
539 void CharacterUI_StatsTab_Draw(Player *player);
540 void CharacterUI_SkillsTab_CreateButtons();
541 void CharacterUI_SkillsTab_Draw(Player *player);
542 void CharacterUI_AwardsTab_Draw(Player *player);
543 void CharacterUI_InventoryTab_Draw(Player *player, bool a2);
544 void CharacterUI_CharacterScreen_Draw(Player *player);
545 void CharacterUI_DrawPaperdoll(Player *player);
546 void CharacterUI_DrawPaperdollWithRingOverlay(Player *player);
547 void CharacterUI_ReleaseButtons();
548
549 unsigned int GetSkillColor(unsigned int uPlayerClass, PLAYER_SKILL_TYPE uPlayerSkillType, signed int skill_level);
550
551
552
553
554
555 // book ui
556 void BookUI_Draw(WindowType book);
557 void BookUI_Questbook_Draw();
558 void BookUI_Autonotes_Draw();
559 void BookUI_Map_Draw();
560 void BookUI_Calendar_Draw();
561 void BookUI_Journal_Draw();
562
563 void OnCloseBook();
564 void InitializeBookTextures();
565 void InitializeBookFonts();
566 void DrawSpellBookContent(Player *player);
567 unsigned int DrawLloydBeaconsScreen();
568 void BookUI_DrawTownPortalMap();
569 void LoadSpellbook(unsigned int uID); // idb
570 void DrawSpellDescriptionPopup(int spell_index);
571 void OnCloseSpellBookPage();
572 void OnCloseSpellBook();
573
574
575
576 // rest ui
577 void RestUI_Load();
578 void RestUI_Draw();
579
580
581 // transition & travel ui
582 void TransitionUI_Load(uint32_t anim_id, uint32_t exit_pic_id, int x, int y, int z, int directiony, int directionx, int a8, const char *pLocationName);
583 void TransitionUI_Draw();
584
585 void TravelUI_Load();
586 void TravelUI_Draw();
587
588
589
590
591
592 void UI_OnMouseRightClick(Vec2_int_ *_this);
593
594 void __fastcall DrawPopupWindow(unsigned int uX, unsigned int uY, unsigned int uWidth, unsigned int uHeight); // idb
595 void DrawMM7CopyrightWindow();
596 //void LoadFonts_and_DrawCopyrightWindow();
597 void GUI_UpdateWindows();
598 int GetConditionDrawColor(unsigned int uConditionIdx); // idb
599 void FillAwardsData();
600 void CreateAwardsScrollBar();
601 void ReleaseAwardsScrollBar();
602 void Inventory_ItemPopupAndAlchemy();
603 void __fastcall LoadThumbnailLloydTexture(unsigned int uSlot, unsigned int uPlayer);
604 unsigned int UI_GetHealthManaAndOtherQualitiesStringColor(signed int current_pos, signed int base_pos);
605 unsigned int __fastcall GetSizeInInventorySlots(unsigned int uNumPixels);
606 struct GUIButton *__fastcall GUI_HandleHotkey(unsigned __int8 uHotkey); // idb
607 int __fastcall GUI_ReplaceHotkey(unsigned __int8 uOldHotkey, unsigned __int8 uNewHotkey, char bFirstCall);
608 void DrawBuff_remaining_time_string(int uY, struct GUIWindow *window, __int64 remaining_time, struct GUIFont *Font);
609 void GameUI_DrawItemInfo(struct ItemGen* inspect_item); // idb
610 void MonsterPopup_Draw(unsigned int uActorID, struct GUIWindow *window);
611 void SetUserInterface(enum PartyAlignment alignment, bool bReplace);
612 void CreateMsgScrollWindow(signed int mscroll_id);
613 void free_book_subwindow();
614 void CreateScrollWindow();
615 void OnPaperdollLeftClick();
616 void DrawJoinGuildWindow(int pEventCode);
617 void DialogueEnding();
618 char sub_4637E0_is_there_popup_onscreen();
619 void sub_4B3E1E();
620 void __fastcall ClickNPCTopic(signed int uMessageParam);
621 void __fastcall DrawTextAtStatusBar(const char *Str, int a5);
622 void _4B3FE5_training_dialogue(int a4);
623 void OracleDialogue();
624 void CheckBountyRespawnAndAward();
625 const char * _4B254D_SkillMasteryTeacher(int trainerInfo);
626 char *BuildDialogueString(const char *lpsz, unsigned __int8 uPlayerID, struct ItemGen *a3, char *a4, int a5, __int64 *a6);
627 void __fastcall DrawTextAtStatusBar(const char *Str, int a5);
628 void ShowStatusBarString(const char *pString, unsigned int uNumSeconds);
629 void ShowNothingHereStatus();
630 int const_2();
631
632
633 void __fastcall ZBuffer_Fill(int *pZBuffer, int uTextureId, int iZValue);
634 void __fastcall ZBuffer_DoFill(int *pZBuffer, struct Texture *pTex, int uZValue);
635 void __fastcall ZBuffer_DoFill2(int *pZBuffer, struct Texture *a2, int a3); // idb
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650 #pragma pack(push, 1)
651 struct GUIButton
652 {
653 void DrawLabel(const char *label_text, struct GUIFont *pFont, int a5, int uFontShadowColor);
654
655 void Release();
656
657
658 unsigned int uX;
659 unsigned int uY;
660 unsigned int uWidth;
661 unsigned int uHeight;
662 unsigned int uZ;
663 unsigned int uW;
664 int uButtonType;
665 int field_1C;//may be pMessageType
666 UIMessageType msg;
667 unsigned int msg_param;
668 int field_28;
669 int field_2C_is_pushed;
670 GUIButton *pPrev;
671 GUIButton *pNext;
672 struct GUIWindow *pParent;
673 struct Texture *pTextures[5];
674 unsigned int uNumTextures;
675 unsigned __int8 uHotkey;
676 char pButtonName[32];
677 char field_75[71];
678 };
679 #pragma pack(pop)
680
681
682
683
684 extern struct GUIButton *pBtn_CloseBook;
685 extern struct GUIButton *pBtn_InstallRemoveSpell;
686 extern struct GUIButton *pBtn_Autonotes_Instructors;
687 extern struct GUIButton *pBtn_Autonotes_Misc;
688 extern struct GUIButton *pBtn_Book_6;
689 extern struct GUIButton *pBtn_Book_5;
690 extern struct GUIButton *pBtn_Book_4;
691 extern struct GUIButton *pBtn_Book_3;
692 extern struct GUIButton *pBtn_Book_2;
693 extern struct GUIButton *pBtn_Book_1;
694
695
696 extern struct GUIButton *pPlayerCreationUI_BtnReset;
697 extern struct GUIButton *pPlayerCreationUI_BtnOK;
698 extern struct GUIButton *pBtn_ExitCancel;
699 extern struct GUIButton *pBtn_YES;
700 extern struct GUIButton *pPlayerCreationUI_BtnPlus;
701 extern struct GUIButton *pPlayerCreationUI_BtnMinus;
702
703
704 extern struct GUIButton *pButton_RestUI_Main;
705 extern struct GUIButton *pButton_RestUI_Exit;
706 extern struct GUIButton *pButton_RestUI_Wait5Minutes;
707 extern struct GUIButton *pButton_RestUI_WaitUntilDawn;
708 extern struct GUIButton *pButton_RestUI_Wait1Hour;
709
710
711 extern struct GUIButton *pCharacterScreen_ExitBtn;
712 extern struct GUIButton *pCharacterScreen_AwardsBtn;
713 extern struct GUIButton *pCharacterScreen_InventoryBtn;
714 extern struct GUIButton *pCharacterScreen_SkillsBtn;
715 extern struct GUIButton *pCharacterScreen_StatsBtn;
716 extern struct GUIButton *pCharacterScreen_DollBtn;
717 extern struct GUIButton *pCharacterScreen_DetalizBtn;
718
719
720 extern struct GUIButton *pBtn_NPCRight;
721 extern struct GUIButton *pBtn_NPCLeft;
722 extern struct GUIButton *pBtn_GameSettings;
723 extern struct GUIButton *pBtn_QuickReference;
724 extern struct GUIButton *pBtn_CastSpell;
725 extern struct GUIButton *pBtn_Rest;
726 extern struct GUIButton *pBtn_History;
727 extern struct GUIButton *pBtn_Calendar;
728 extern struct GUIButton *pBtn_Maps;
729 extern struct GUIButton *pBtn_Autonotes;
730 extern struct GUIButton *pBtn_Quests;
731
732
733 extern struct GUIButton *pMMT_MainMenu_BtnMM6;
734 extern struct GUIButton *pMMT_MainMenu_BtnMM7;
735 extern struct GUIButton *pMMT_MainMenu_BtnMM8;
736 extern struct GUIButton *pMMT_MainMenu_BtnContinue;
737 extern struct GUIButton *pMMT_MainMenu_BtnExit;
738
739 extern struct GUIButton *pMainMenu_BtnExit;
740 extern struct GUIButton *pMainMenu_BtnCredits;
741 extern struct GUIButton *pMainMenu_BtnLoad;
742 extern struct GUIButton *pMainMenu_BtnNew;
743
744
745 extern struct GUIButton *pBtn_Up;
746 extern struct GUIButton *pBtn_Down;
747 extern struct GUIButton *ptr_507BA4;
748
749
750 extern struct GUIWindow *pPrimaryWindow;
751 extern struct GUIWindow *pChestWindow;
752 extern struct GUIWindow *pDialogueWindow;
753 extern struct GUIWindow *window_SpeakInHouse;
754 extern struct GUIWindow *pGUIWindow_ScrollWindow;
755 extern struct GUIWindow *ptr_507BC8;
756 extern struct GUIWindow *pGUIWindow_CurrentMenu;
757 extern struct GUIWindow *ptr_507BD0;
758 extern struct GUIWindow *pGUIWindow_Settings;
759 extern struct GUIWindow *pModalWindow;
760 extern struct GUIWindow *pGUIWindow_EscMessageWindow;
761 extern struct GUIWindow *pBooksWindow;
762 extern struct GUIWindow *pGUIWindow2;
763
764
765 extern struct GUIButton *pBtn_Resume;
766 extern struct GUIButton *pBtn_QuitGame;
767 extern struct GUIButton *pBtn_GameControls;
768 extern struct GUIButton *pBtn_LoadGame;
769 extern struct GUIButton *pBtn_SaveGame;
770 extern struct GUIButton *pBtn_NewGame;
771
772 extern struct GUIButton *pBtn_SliderRight;
773 extern struct GUIButton *pBtn_SliderLeft;
774
775
776 extern struct GUIButton *pBtnDownArrow;
777 extern struct GUIButton *pBtnArrowUp;
778 extern struct GUIButton *pBtnCancel;
779 extern struct GUIButton *pBtnLoadSlot;
780
781
782 extern std::array<GUIButton*, 4> pCreationUI_BtnPressRight2;
783 extern std::array<GUIButton*, 4> pCreationUI_BtnPressLeft2;
784 extern std::array<GUIButton*, 4> pCreationUI_BtnPressLeft;
785 extern std::array<GUIButton*, 4> pCreationUI_BtnPressRight;
786
787 extern int uTextureID_GameUI_CharSelectionFrame; // 50C98C
788
789 extern unsigned int ui_mainmenu_copyright_color;
790 extern unsigned int ui_character_tooltip_header_default_color;
791 extern unsigned int ui_character_default_text_color;
792 extern unsigned int ui_character_skill_highlight_color;
793 extern unsigned int ui_character_header_text_color;
794 extern unsigned int ui_character_bonus_text_color;
795 extern unsigned int ui_character_bonus_text_color_neg;
796 extern unsigned int ui_character_skill_upgradeable_color;
797 extern unsigned int ui_character_skill_default_color;
798 extern unsigned int ui_character_stat_default_color;
799 extern unsigned int ui_character_stat_buffed_color;
800 extern unsigned int ui_character_stat_debuffed_color;
801 extern unsigned int ui_character_skillinfo_can_learn;
802 extern unsigned int ui_character_skillinfo_can_learn_gm;
803 extern unsigned int ui_character_skillinfo_cant_learn;
804 extern unsigned int ui_character_condition_normal_color;
805 extern unsigned int ui_character_condition_light_color;
806 extern unsigned int ui_character_condition_moderate_color;
807 extern unsigned int ui_character_condition_severe_color;
808 extern std::array<unsigned int, 6> ui_character_award_color;
809 extern unsigned int ui_game_minimap_outline_color;
810 extern unsigned int ui_game_minimap_actor_friendly_color;
811 extern unsigned int ui_game_minimap_actor_hostile_color;
812 extern unsigned int ui_game_minimap_actor_corpse_color;
813 extern unsigned int ui_game_minimap_decoration_color_1;
814 extern unsigned int ui_game_minimap_projectile_color;
815 extern unsigned int ui_game_minimap_treasure_color;
816 extern std::array<unsigned int, 24> ui_game_character_record_playerbuff_colors;
817 extern unsigned int ui_gamemenu_video_gamma_title_color;
818 extern unsigned int ui_gamemenu_keys_action_name_color;
819 extern unsigned int ui_gamemenu_keys_key_selection_blink_color_1;
820 extern unsigned int ui_gamemenu_keys_key_selection_blink_color_2;
821 extern unsigned int ui_gamemenu_keys_key_default_color;
822 extern unsigned int ui_book_quests_title_color;
823 extern unsigned int ui_book_quests_text_color;
824 extern unsigned int ui_book_autonotes_title_color;
825 extern unsigned int ui_book_autonotes_text_color;
826 extern unsigned int ui_book_map_title_color;
827 extern unsigned int ui_book_map_coordinates_color;
828 extern unsigned int ui_book_calendar_title_color;
829 extern unsigned int ui_book_calendar_time_color;
830 extern unsigned int ui_book_calendar_day_color;
831 extern unsigned int ui_book_calendar_month_color;
832 extern unsigned int ui_book_calendar_year_color;
833 extern unsigned int ui_book_calendar_moon_color;
834 extern unsigned int ui_book_calendar_location_color;
835 extern unsigned int ui_book_journal_title_color;
836 extern unsigned int ui_book_journal_text_color;
837 extern unsigned int ui_book_journal_text_shadow;
838 extern unsigned int ui_game_dialogue_npc_name_color;
839 extern unsigned int ui_game_dialogue_option_highlight_color;
840 extern unsigned int ui_game_dialogue_option_normal_color;
841 extern unsigned int ui_house_player_cant_interact_color;