Mercurial > mm7
view GUIWindow.h @ 877:84c8119c366a
.
author | Nomad |
---|---|
date | Mon, 01 Apr 2013 14:58:02 +0200 |
parents | dfd683c4f538 |
children | 10fa7dad1391 |
line wrap: on
line source
#pragma once #include "Items.h" #include "Player.h" enum UIMessageType: unsigned __int32 { UIMSG_0 = 0, UIMSG_ChangeGameState = 5, UIMSG_A = 10, UIMSG_C = 12, UIMSG_E = 14, UIMSG_F = 15, UIMSG_11 = 17, UIMSG_Attack = 23, UIMSG_19 = 25, UIMSG_1B = 27, UIMSG_1C = 28, UIMSG_PlayArcomage = 29, UIMSG_31 = 49, UIMSG_32 = 50, UIMSG_33 = 51, UIMSG_34 = 52, UIMSG_35 = 53, UIMSG_MainMenu_ShowPartyCreationWnd = 54, UIMSG_MainMenu_ShowLoadWindow = 55, UIMSG_ShowCredits = 56, UIMSG_ExitToWindows = 57, UIMSG_3A = 58, UIMSG_PlayerCreationChangeName = 60, UIMSG_PlayerCreationClickPlus = 62, UIMSG_PlayerCreationClickMinus = 63, UIMSG_PlayerCreationSelectActiveSkill = 64, UIMSG_PlayerCreationSelectClass = 65, UIMSG_PlayerCreationClickOK = 66, UIMSG_PlayerCreationClickReset = 67, UIMSG_44 = 68, UIMSG_45 = 69, UIMSG_46 = 70, UIMSG_AutonotesBook = 71, UIMSG_48 = 72, UIMSG_49 = 73, UIMSG_PlayerCreationRemoveUpSkill = 74, UIMSG_PlayerCreationRemoveDownSkill = 75, UIMSG_4E = 78, UIMSG_SPellbook_ShowHightlightedSpellInfo = 79, UIMSG_BuyInShop_Identify_Repair = 81, UIMSG_LoadGame = 82, UIMSG_SaveGame = 83, UIMSG_54 = 84, UIMSG_55 = 85, UIMSG_SelectSpell = 86, UIMSG_OpenSpellbookPage = 87, UIMSG_58 = 88, UIMSG_OnTravelByFoot = 90, UIMSG_5B = 91, UIMSG_ShowStatus_DateTime = 92, UIMSG_ShowStatus_ManaHP = 93, UIMSG_ShowStatus_Player = 94, UIMSG_Wait5Minutes = 95, UIMSG_Wait1Hour = 96, UIMSG_61 = 97, UIMSG_ShowStatus_Food = 100, UIMSG_ShowStatus_Funds = 101, UIMSG_68 = 104, UIMSG_69 = 105, UIMSG_QuickReference = 106, UIMSG_GameMenuButton = 107, UIMSG_AlreadyResting = 109, UIMSG_SelectCharacter = 110, UIMSG_ChangeSoundVolume = 111, UIMSG_ChangeMusicVolume = 112, UIMSG_Escape = 113, UIMSG_72 = 114, UIMSG_73 = 115, UIMSG_74 = 116, UIMSG_75 = 117, UIMSG_PlayerCreation_SelectAttribute = 118, UIMSG_InventoryLeftClick = 120, UIMSG_SkillUp = 121, UIMSG_7A = 122, UIMSG_GameMenu_ReturnToGame = 123, UIMSG_StartNewGame = 124, UIMSG_Game_OpenLoadGameDialog = 125, UIMSG_Game_OpenSaveGameDialog = 126, UIMSG_Game_OpenOptionsDialog = 127, UIMSG_80 = 128, UIMSG_SetGraphicsMode = 131, UIMSG_Quit = 132, UIMSG_85 = 133, UIMSG_StartHireling1Dialogue = 134, UIMSG_StartHireling2Dialogue = 135, UIMSG_SelectNPCDialogueOption = 136, UIMSG_8C = 140, UIMSG_8D = 141, UIMSG_CastSpellFromBook = 142, UIMSG_8F = 143, UIMSG_PlayerCreation_VoicePrev = 144, UIMSG_PlayerCreation_VoiceNext = 145, UIMSG_92 = 146, UIMSG_StartNPCDialogue = 161, UIMSG_ArrowUp = 162, UIMSG_DownArrow = 163, UIMSG_LoadSlot = 164, UIMSG_SelectLoadSlot = 165, UIMSG_Cancel = 166, UIMSG_ExitRest = 167, UIMSG_A8 = 168, UIMSG_A9 = 169, UIMSG_AA = 170, UIMSG_PlayerCreation_FacePrev = 171, UIMSG_PlayerCreation_FaceNext = 172, UIMSG_AD = 173, UIMSG_AE = 174, UIMSG_ClickNPCTopic = 175, UIMSG_CycleCharacters = 176, UIMSG_B1 = 177, UIMSG_B2 = 178, UIMSG_B3 = 179, UIMSG_B4 = 180, UIMSG_B5 = 181, UIMSG_B6 = 182, UIMSG_B7 = 183, UIMSG_SetTurnSpeed = 184, UIMSG_ToggleWalkSound = 185, UIMSG_ChangeVoiceVolume = 186, UIMSG_ToggleShowDamage = 187, UIMSG_ScrollNPCPanel = 188, UIMSG_BD = 189, UIMSG_BE = 190, UIMSG_BF = 191, UIMSG_C0 = 192, UIMSG_C1 = 192, UIMSG_C2 = 192, UIMSG_OnCastTownPortal = 195, UIMSG_C4 = 196, UIMSG_ShowFinalWindow = 197, UIMSG_C6 = 198, UIMSG_C7 = 199, UIMSG_OpenQuestBook = 200, UIMSG_OpenAutonotes = 201, UIMSG_OpenMapBook = 202, UIMSG_OpenCalendar = 203, UIMSG_CC = 204, UIMSG_CD = 205, UIMSG_CE = 206, UIMSG_CF = 207, UIMSG_D0 = 208, UIMSG_D1 = 209, UIMSG_D2 = 210, UIMSG_D3 = 211, UIMSG_D4 = 212, UIMSG_D5 = 213, UIMSG_D6 = 214, UIMSG_DD = 221, UIMSG_OpenHistoryBook = 224, UIMSG_ToggleAlwaysRun = 225, UIMSG_ToggleFlipOnExit = 226, UIMSG_16F = 367, UIMSG_170 = 368, UIMSG_Game_Action = 404, UIMSG_SelectShopDialogueOption = 405, UIMSG_OpenRestUI = 409, UIMSG_19A = 410, UIMSG_TransitionUI_Confirm = 411, UIMSG_19C = 412, UIMSG_OpenKeyMappingOptions = 415, UIMSG_SelectKeyPage1 = 416, UIMSG_SelectKeyPage2 = 417, UIMSG_ResetKeyMapping = 418, UIMSG_ChangeKeyButton = 419, UIMSG_OpenVideoOptions = 421, UIMSG_ToggleBloodsplats = 422, UIMSG_ToggleColoredLights = 423, UIMSG_ToggleTint = 424, UIMSG_1A9 = 425, }; /* 251 */ enum MENU_STATE : __int32 { MENU_MAIN = 0x0, MENU_NEWGAME = 0x1, MENU_CREDITS = 0x2, MENU_SAVELOAD = 0x3, MENU_FINISHED = 0x4, MENU_5 = 0x5, MENU_CREATEPARTY = 0x6, MENU_NAMEPANELESC = 0x7, MENU_CREDITSPROC = 0x8, MENU_LOADINGPROC = 0x9, MENU_10 = 0xA, MENU_CREDITSCLOSE = 0xB, }; enum DIALOGUE_TYPE { DIALOGUE_9 = 9, DIALOGUE_13 = 0xD, DIALOGUE_18 = 0x12, DIALOGUE_19 = 19, DIALOGUE_20 = 20, DIALOGUE_21 = 21, DIALOGUE_22 = 22, DIALOGUE_23 = 23, DIALOGUE_24 = 0x18, DIALOGUE_76 = 76, DIALOGUE_PROFESSION_DETAILS = 77, DIALOGUE_ARENA_WELCOME = 0x59, DIALOGUE_ARENA_FIGHT_NOT_OVER_YET = 0x5A, DIALOGUE_ARENA_REWARD = 0x5B, DIALOGUE_ARENA_ALREADY_WON = 0x5C, }; /* 298 */ enum WindowType: unsigned __int32 { WINDOW_null = 0, WINDOW_MainMenu = 0x1, WINDOW_3 = 0x3, WINDOW_CharacterRecord = 0x4, WINDOW_Options = 0x6, WINDOW_8 = 8, WINDOW_Book = 0x9, WINDOW_Dialogue = 0xA, WINDOW_QuickReference = 12, WINDOW_Rest = 0x10, WINDOW_ChangeLocation = 17, WINDOW_SpellBook = 0x12, WINDOW_GreetingNPC = 19, WINDOW_Chest = 0x14, WINDOW_17 = 23, WINDOW_MainMenu_Load = 0x18, WINDOW_HouseInterior = 0x19, WINDOW_Transition = 26, WINDOW_1B = 0x1B, WINDOW_Scroll = 0x1E, WINDOW_1F = 31, WINDOW_FinalWindow = 0x46, WINDOW_50 = 0x50, WINDOW_59 = 0x59, WINDOW_5A = 90, WINDOW_5B = 91, WINDOW_VoiceSwitcherButton = 0x5C, WINDOW_5D = 0x5D, WINDOW_5E = 94, WINDOW_5F = 0x5F, WINDOW_60 = 96, WINDOW_61 = 0x61, WINDOW_RestWindow = 0x62, WINDOW_63 = 99, WINDOW_CharacterWindow_Stats = 0x64, WINDOW_CharacterWindow_Skills = 0x65, WINDOW_CharacterWindow_Awards = 0x66, WINDOW_CharacterWindow_Inventory = 0x67, WINDOW_68 = 104, WINDOW_KeyMappingOptions = 0x69, WINDOW_VideoOptions = 0x6A, WINDOW_Lloyd = 0xB1, WINDOW_TownPortal = 195, WINDOW_QuestBook = 200, WINDOW_AutonotesBook = 0xC9, WINDOW_MapsBook = 0xCA, WINDOW_CalendarBook = 0xCB, WINDOW_HistoryBook = 0xE0, }; struct GUIButton; struct Texture; /* 155 */ #pragma pack(push, 1) struct GUIWindow { inline GUIWindow() { pControlsHead = pControlsTail = nullptr; eWindowType = WINDOW_null; } GUIButton *CreateButton(unsigned int uX, unsigned int uY, unsigned int uWidth, unsigned int uHeight, int a6, int a7, UIMessageType msg, unsigned int msg_param, unsigned __int8 uHotkey, const char *pName, Texture *pTextures, ...); void DrawFlashingInputCursor(signed int a3, int a4, struct GUIFont *a2); int DrawTextInRect(GUIFont *a2, unsigned int uX, unsigned int uY, unsigned int uColor, const char *Str1, int Source, int a8); char DrawText(GUIFont *a2, signed int uX, int uY, unsigned int uFontColor, const char *Str, int a7, int a8, unsigned int uFontShadowColor); void DrawTitleText(GUIFont *a2, signed int uHorizontalMargin, unsigned int uVerticalMargin, unsigned __int16 uDefaultColor, const char *pInString, unsigned int uLineSpacing); void DrawCurrentTime(__int64 a2); void HouseDialogManager(); void OpenSpellBook(); void InitializeBookView(); void DrawMessageBox(int arg0); GUIButton *GetControl(unsigned int uID); void Release(); void _41D08F(int a2, int a3, int a4, int a5); void DrawQuickCharRecord(); char _41D73D_draw_buff_tooltip(); static GUIWindow *Create(unsigned int uX, unsigned int uY, unsigned int uWidth, unsigned int uHeight, enum WindowType eType, int a4, int a5); unsigned int uFrameX; unsigned int uFrameY; unsigned int uFrameWidth; unsigned int uFrameHeight; unsigned int uFrameZ; unsigned int uFrameW; WindowType eWindowType; union{ void *ptr_1C; unsigned int par1C; }; unsigned int uNumControls; int field_24; int pNumPresenceButton; int pCurrentPosActiveItem; int field_30; int field_34; int pStartingPosActiveItem; int numVisibleWindows; int field_40; int field_44; char *Hint; GUIButton *pControlsHead; GUIButton *pControlsTail; }; #pragma pack(pop) enum CURRENT_SCREEN { SCREEN_GAME = 0x0, SCREEN_MENU = 0x1, SCREEN_OPTIONS = 0x2, SCREEN_BOOKS = 0x3, SCREEN_NPC_DIALOGUE = 0x4, SCREEN_REST = 0x5, SCREEN_CHARACTERS = 0x7, SCREEN_SPELL_BOOK = 0x8, SCREEN_CREATORS = 0x9, SCREEN_CHEST = 0xA, SCREEN_SAVEGAME = 0xB, SCREEN_LOADGAME = 0xC, SCREEN_HOUSE = 0xD, SCREEN_E = 0xE, SCREEN_F = 0xF, SCREEN_VIDEO = 0x10, SCREEN_CHANGE_LOCATION = 0x11, SCREEN_INPUT_BLV = 0x12, SCREEN_BRANCHLESS_NPC_DIALOG = 0x13, SCREEN_PARTY_CREATION = 0x15, SCREEN_PRESS_ESCAPE_MESSAGE = 0x16, SCREEN_CASTING = 0x17, SCREEN_19 = 0x19, SCREEN_KEYBOARD_OPTIONS = 0x1A, SCREEN_1B = 0x1B, SCREEN_VIDEO_OPTIONS = 0x1C, SCREEN_63 = 0x63, SCREEN_64 = 0x64, SCREEN_67 = 0x67, SCREEN_QUICK_REFERENCE = 0x68, }; /* 249 */ #pragma pack(push, 1) struct GUIMessage { enum UIMessageType eType; int param; int field_8; }; #pragma pack(pop) #define AddMessage(msg, param, a4) AddMessageImpl((msg), (param), (a4), __FILE__, __LINE__) /* 250 */ #pragma pack(push, 1) struct GUIMessageQueue { inline GUIMessageQueue(): uNumMessages(0) {} void Flush(); void PopMessage(UIMessageType *pMsg, int *pParam, int *a4); void AddMessageImpl(UIMessageType msg, int param, unsigned int a4, const char *file = nullptr, int line = 0); unsigned int uNumMessages; GUIMessage pMessages[40]; const char *files[40]; int lines[40]; }; #pragma pack(pop) extern struct GUIMessageQueue *pMessageQueue_50CBD0; // idb void OnSelectNPCDialogueOption(DIALOGUE_TYPE newDialogueType); extern int pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[]; // idb extern struct GUIWindow *pWindow_MainMenu; extern struct GUIWindow pWindowList[20]; void QuickRefDraw(); //character ui unsigned int __fastcall GetSkillColor(unsigned int uPlayerClass, PLAYER_SKILL_TYPE uPlayerSkillType, signed int skill_level); const char *__fastcall CharacterUI_GetSkillDescText(unsigned int uPlayerID, PLAYER_SKILL_TYPE uPlayerSkillType); char __cdecl CharacterUI_SkillsTab_ShowHint(); char __cdecl CharacterUI_StatsTab_ShowHint(); char __fastcall CharacterUI_StatsTab_Draw(unsigned int uPlayerID); // idb #pragma pack(push, 1) struct GUIButton { char DrawLabel(const char *edx0, struct GUIFont *pFont, int a5, int *a9); void Release(); unsigned int uX; unsigned int uY; unsigned int uWidth; unsigned int uHeight; unsigned int uZ; unsigned int uW; int uButtonType; int field_1C;//may be pMessageType UIMessageType msg; unsigned int msg_param; int field_28; int field_2C_is_pushed; GUIButton *pPrev; GUIButton *pNext; struct GUIWindow *pParent; struct Texture *pTextures[5]; unsigned int uNumTextures; unsigned __int8 uHotkey; char pButtonName[32]; char field_75[71]; }; #pragma pack(pop) extern struct GUIButton *pBtn_CloseBook; extern struct GUIButton *pBtn_InstallRemoveSpell; extern struct GUIButton *pBtn_Autonotes_Instructors; extern struct GUIButton *pBtn_Autonotes_Misc; extern struct GUIButton *pBtn_Book_6; extern struct GUIButton *pBtn_Book_5; extern struct GUIButton *pBtn_Book_4; extern struct GUIButton *pBtn_Book_3; extern struct GUIButton *pBtn_Book_2; extern struct GUIButton *pBtn_Book_1; extern struct GUIButton *pPlayerCreationUI_BtnReset; extern struct GUIButton *pPlayerCreationUI_BtnOK; extern struct GUIButton *pBtn_ExitCancel; extern struct GUIButton *pBtn_YES; extern struct GUIButton *pPlayerCreationUI_BtnPlus; extern struct GUIButton *pPlayerCreationUI_BtnMinus; extern struct GUIButton *pButton_RestUI_Main; extern struct GUIButton *pButton_RestUI_Exit; extern struct GUIButton *pButton_RestUI_Wait5Minutes; extern struct GUIButton *pButton_RestUI_WaitUntilDawn; extern struct GUIButton *pButton_RestUI_Wait1Hour; extern struct GUIButton *pCharacterScreen_ExitBtn; extern struct GUIButton *pCharacterScreen_AwardsBtn; extern struct GUIButton *pCharacterScreen_InventoryBtn; extern struct GUIButton *pCharacterScreen_SkillsBtn; extern struct GUIButton *pCharacterScreen_StatsBtn; extern struct GUIButton *pCharacterScreen_DollBtn; extern struct GUIButton *pCharacterScreen_DetalizBtn; extern struct GUIButton *pBtn_NPCRight; extern struct GUIButton *pBtn_NPCLeft; extern struct GUIButton *pBtn_GameSettings; extern struct GUIButton *pBtn_QuickReference; extern struct GUIButton *pBtn_CastSpell; extern struct GUIButton *pBtn_Rest; extern struct GUIButton *pBtn_History; extern struct GUIButton *pBtn_Calendar; extern struct GUIButton *pBtn_Maps; extern struct GUIButton *pBtn_Autonotes; extern struct GUIButton *pBtn_Quests; extern struct GUIButton *pMainMenu_BtnExit; extern struct GUIButton *pMainMenu_BtnCredits; extern struct GUIButton *pMainMenu_BtnLoad; extern struct GUIButton *pMainMenu_BtnNew; extern struct GUIButton *pBtn_Up; extern struct GUIButton *pBtn_Down; extern struct GUIButton *ptr_507BA4; extern struct GUIWindow *pPrimaryWindow; extern struct GUIWindow *pChestWindow; extern struct GUIWindow *pDialogueWindow; extern struct GUIWindow *window_SpeakInHouse; extern struct GUIWindow *pGUIWindow_ScrollWindow; extern struct GUIWindow *ptr_507BC8; extern struct GUIWindow *pGUIWindow_CurrentMenu; extern struct GUIWindow *ptr_507BD0; extern struct GUIWindow *pGUIWindow_Settings; extern struct GUIWindow *ptr_507BDC; extern struct GUIWindow *pGUIWindow_EscMessageWindow; extern struct GUIWindow *pBooksWindow; extern struct GUIWindow *pGUIWindow2; extern struct GUIButton *pBtn_Resume; extern struct GUIButton *pBtn_QuitGame; extern struct GUIButton *pBtn_GameControls; extern struct GUIButton *pBtn_LoadGame; extern struct GUIButton *pBtn_SaveGame; extern struct GUIButton *pBtn_NewGame; extern struct GUIButton *pBtn_SliderRight; extern struct GUIButton *pBtn_SliderLeft; extern struct GUIButton *pBtnDownArrow; extern struct GUIButton *pBtnArrowUp; extern struct GUIButton *pBtnCancel; extern struct GUIButton *pBtnLoadSlot; extern GUIButton *pCreationUI_BtnPressRight2[4]; extern GUIButton *pCreationUI_BtnPressLeft2[4]; extern GUIButton *pCreationUI_BtnPressLeft[4]; extern GUIButton *pCreationUI_BtnPressRight[4];