#ifndef RAGNAROK_SOURCE_UI_WINDOW_UIWINDOWMGR_H #define RAGNAROK_SOURCE_UI_WINDOW_UIWINDOWMGR_H #include "Contents/UserData/NormalItemSlots.h" #include "UI/Layout/SnapRectangle.h" #include #include #include #include #include #include #include #include #include #include class UIWindow; class UIMessageBox; class CBitmapRes; class CWebBrowser; struct MessengerMember; struct ReplayOptions; struct ModeDragState; struct WindowTextEntry { /* 0000 */ std::string text; /* 0018 */ std::uint32_t color; }; struct WindowTextRecord { /* 0000 */ std::string text; /* 0018 */ std::uint32_t padding_0018; /* 001C */ std::uint32_t padding_001C; }; struct SavedWindowRectangle { // INLINED SavedWindowRectangle(int left, int top, int rectangleWidth, int rectangleHeight) : x(left), y(top), width(rectangleWidth), height(rectangleHeight) {} /* 0000 */ int x; /* 0004 */ int y; /* 0008 */ int width; /* 000C */ int height; }; struct WindowPolicyEntry { /* 0000 */ int actions[8]; }; class UIRoulletteWnd; class UIWindowMgr { public: int SendNotice(int selector, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d, std::intptr_t e); /* 0004 */ int activeWindowId; /* 0008 */ std::map windows; /* 0010 */ int keyCode; /* 0014 */ int modifierKey; /* 0018 */ std::list windowHistory; /* 0020 */ int lastWindowId; /* 0024 */ unsigned char inputSuggestionsEnabled; /* 0025 */ unsigned char imeInputActive; /* 0026 */ unsigned char chatModeChanged; /* 0028 */ std::map retainedWindows; /* 0030 */ int chatWndX; /* 0034 */ int chatWndY; /* 0038 */ int chatWndHeight; /* 003C */ int chatWndVisible; /* 0040 */ int padding_0040; /* 0044 */ int padding_0044; /* 0048 */ int skillDescriptionVisible; /* 004C */ int chatWndStatus; /* 0050 */ float minimapZoom; /* 0054 */ unsigned char minimapMarkersVisible; /* 0055 */ unsigned char padding_0055[3]; /* 0058 */ int itemStoreWindowCount; /* 005C */ std::uint32_t minimapColor; /* 0060 */ int drawCompass; /* 0064 */ int dragAllItems; /* 0068 */ int compactCompositionLayout; /* 006C */ int rightToLeftChatEnabled; /* 0070 */ int padding_0070; /* 0074 */ int padding_0074; /* 0078 */ int padding_0078; /* 007C */ int padding_007C; /* 0080 */ int padding_0080; /* 0084 */ int padding_0084; /* 0088 */ int padding_0088; /* 008C */ int padding_008C; /* 0090 */ int padding_0090; /* 0094 */ int padding_0094; /* 0098 */ int padding_0098; /* 009C */ int padding_009C; /* 00A0 */ int padding_00A0; /* 00A4 */ int padding_00A4; /* 00A8 */ int padding_00A8; /* 00AC */ int padding_00AC; /* 00B0 */ int padding_00B0; /* 00B4 */ int padding_00B4; /* 00B8 */ int padding_00B8; /* 00BC */ int padding_00BC; /* 00C0 */ int padding_00C0; /* 00C4 */ int padding_00C4; /* 00C8 */ int padding_00C8; /* 00CC */ int padding_00CC; /* 00D0 */ int padding_00D0; /* 00D4 */ int padding_00D4; /* 00D8 */ int padding_00D8; /* 00DC */ int padding_00DC; /* 00E0 */ int padding_00E0; /* 00E4 */ int padding_00E4; /* 00E8 */ int padding_00E8; /* 00EC */ int padding_00EC; /* 00F0 */ int padding_00F0; /* 00F4 */ int padding_00F4; /* 00F8 */ int padding_00F8; /* 00FC */ int padding_00FC; /* 0100 */ int padding_0100; /* 0104 */ int padding_0104; /* 0108 */ int padding_0108; /* 010C */ int padding_010C; /* 0110 */ int padding_0110; /* 0114 */ int padding_0114; /* 0118 */ int padding_0118; /* 011C */ int padding_011C; /* 0120 */ int padding_0120; /* 0124 */ int padding_0124; /* 0128 */ int padding_0128; /* 012C */ int padding_012C; /* 0130 */ int padding_0130; /* 0134 */ int padding_0134; /* 0138 */ int padding_0138; /* 013C */ int padding_013C; /* 0140 */ int padding_0140; /* 0144 */ int padding_0144; /* 0148 */ int padding_0148; /* 014C */ int padding_014C; /* 0150 */ int padding_0150; /* 0154 */ int padding_0154; /* 0158 */ int padding_0158; /* 015C */ int padding_015C; /* 0160 */ int padding_0160; /* 0164 */ int padding_0164; /* 0168 */ int padding_0168; /* 016C */ int padding_016C; /* 0170 */ std::set persistentWindows; /* 0178 */ bool retainedPersistentWindow; /* 017C */ std::list rendered; /* 0184 */ std::list retired; /* 018C */ std::list registeredWindows; /* 0194 */ std::map snapRectangles; /* 019C */ UIWindow* inputWindow; /* 01A0 */ UIWindow* hoverWindow; /* 01A4 */ std::deque modalWindows; /* 01B8 */ UIWindow* previousMouseWnd; /* 01BC */ UIWindow* loadingWnd; /* 01C0 */ UIWindow* minimapZoomWnd; /* 01C4 */ UIWindow* statusWnd; /* 01C8 */ UIWindow* chatWnd; /* 01CC */ UIWindow* loginWnd; /* 01D0 */ UIWindow* loginOTPWnd; /* 01D4 */ UIWindow* itemWnd; /* 01D8 */ std::uint32_t padding_01D8; /* 01DC */ UIWindow* basicInfoWnd; /* 01E0 */ UIWindow* equipWnd; /* 01E4 */ UIWindow* nCashWnd; /* 01E8 */ UIWindow* shortCutWnd; /* 01EC */ UIWindow* itemDropCntWnd; /* 01F0 */ UIWindow* sayDialogWnd; /* 01F4 */ UIWindow* sayDialogOverlayWnd; /* 01F8 */ UIWindow* choose3Wnd; /* 01FC */ UIWindow* itemIdentifyWnd; /* 0200 */ UIWindow* itemRepairWnd; /* 0204 */ UIWindow* weaponRefineWnd; /* 0208 */ UIWindow* itemCompositionWnd; /* 020C */ UIWindow* chooseWarpWnd; /* 0210 */ UIWindow* menuWnd; /* 0214 */ UIWindow* comboBoxWnd; /* 0218 */ UIWindow* itemCollectionWnd; /* 021C */ UIWindow* comboBoxIDWnd; /* 0220 */ UIWindow* itemCollectionComparisonWnd; /* 0224 */ UIWindow* combinedCardItemCollectionComparisonWnd; /* 0228 */ UIWindow* combinedCardItemCollectionWnd; /* 022C */ UIWindow* itemParamChangeDisplayWnd; /* 0230 */ UIWindow* skillDescribeWnd; /* 0234 */ UIWindow* quitWnd; /* 0238 */ UIWindow* restartWnd; /* 023C */ UIWindow* cardItemIllustWnd; /* 0240 */ UIWindow* notifyLevelUpWnd; /* 0244 */ UIWindow* notifyJobLevelUpWnd; /* 0248 */ UIWindow* notifyQuestWnd; /* 024C */ UIWindow* nCashCallWnd; /* 0250 */ UIWindow* itemShopWnd; /* 0254 */ UIWindow* itemShopWnd2; /* 0258 */ UIWindow* itemPurchaseWnd; /* 025C */ UIWindow* itemSellWnd; /* 0260 */ UIWindow* itemSellWnd2; /* 0264 */ UIWindow* chooseSellBuyWnd; /* 0268 */ UIWindow* paraItemShopWnd; /* 026C */ UIWindow* paraItemPurchaseWnd; /* 0270 */ UIWindow* paraResultWnd; /* 0274 */ UIWindow* chatRoomMakeWnd; /* 0278 */ UIWindow* chatRoomChangeWnd; /* 027C */ UIWindow* chatRoomWnd; /* 0280 */ UIWindow* passwordWnd; /* 0284 */ UIWindow* exchangeAcceptWnd; /* 0288 */ UIWindow* itemStoreWnd; /* 028C */ UIWindow* itemStoreTabWnds[7]; /* 02A8 */ UIWindow* itemStoreLastTabWnd; /* 02AC */ UIWindow* itemStoreFindWnd; /* 02B0 */ UIWindow* seekPartyWnd; /* 02B4 */ UIWindow* seekPartyMessageWnd; /* 02B8 */ UIWindow* jobListWnd; /* 02BC */ UIWindow* seekPartyListWnd; /* 02C0 */ UIWindow* partyBookingHelpWnd; /* 02C4 */ UIWindow* skillListWnd; /* 02C8 */ UIWindow* messengerGroupWnd; /* 02CC */ UIWindow* joinPartyAcceptWnd; /* 02D0 */ UIWindow* coupleAcceptWnd; /* 02D4 */ UIWindow* starPlaceAcceptWnd; /* 02D8 */ UIWindow* mixAcceptWnd; /* 02DC */ UIWindow* yourItemWnd; /* 02E0 */ UIWindow* babyAcceptWnd; /* 02E4 */ UIWindow* babyAcceptWnd2; /* 02E8 */ UIWindow* joinGuildAcceptWnd; /* 02EC */ UIWindow* allyGuildAcceptWnd; /* 02F0 */ UIWindow* tipOfTheDayWnd; /* 02F4 */ UIWindow* merchantItemWnd; /* 02F8 */ std::uint32_t merchantMirrorItemWnd; /* 02FC */ UIWindow* merchantShopMakeWnd; /* 0300 */ UIWindow* merchantItemShopWnd; /* 0304 */ UIWindow* merchantItemMyShopWnd; /* 0308 */ UIWindow* merchantItemPurchaseWnd; /* 030C */ UIWindow* partySettingWnd; /* 0310 */ UIWindow* skillNameChangeWnd; /* 0314 */ UIWindow* npcEditDialogWnd; /* 0318 */ UIWindow* npcTextEditDialogWnd; /* 031C */ UIWindow* notifyItemObtainWnd; /* 0320 */ UIWindow* guildInfoManageWnd; /* 0324 */ UIWindow* guildMemberManageWnd; /* 0328 */ UIWindow* guildPositionManageWnd; /* 032C */ UIWindow* guildSkillWnd; /* 0330 */ UIWindow* guildBanishedMemberWnd; /* 0334 */ UIWindow* guildNoticeWnd; /* 0338 */ UIWindow* guildTotalInfoWnd; /* 033C */ UIWindow* friendOptionWnd; /* 0340 */ UIWindow* guildLeaveReasonDescWnd; /* 0344 */ UIWindow* guildBanReasonDescWnd; /* 0348 */ UIWindow* illustWnd; /* 034C */ UIWindow* multiIllustWnds[10]; /* 0374 */ UIWindow* makeTargetListWnd; /* 0378 */ UIWindow* makeTargetProcessWnd; /* 037C */ UIWindow* makeTargetResultWnd; /* 0380 */ UIWindow* emotionWnd; /* 0384 */ UIWindow* cashEmotionListWnd; /* 0388 */ UIWindow* prohibitListWnd; /* 038C */ UIWindow* petInfoWnd; /* 0390 */ UIWindow* petEggListWnd; /* 0394 */ UIWindow* petTamingDeceiveWnd; /* 0398 */ UIWindow* makingArrowListWnd; /* 039C */ UIWindow* selectCartWnd; /* 03A0 */ UIWindow* spellListWnd; /* 03A4 */ UIWindow* candidateWnd; /* 03A8 */ UIWindow* compositionWnd; /* 03AC */ UIWindow* keyStrokeWnd; /* 03B0 */ UIWindow* bookWnd; /* 03B4 */ UIWindow* joinFriendAcceptWnd; /* 03B8 */ UIWindow* secondPasswordInputWnd; /* 03BC */ UIWindow* secondPasswordEditWnd; /* 03C0 */ UIWindow* homunInfoWnd; /* 03C4 */ UIWindow* homunculusSkillWnd; /* 03C8 */ UIWindow* mercenaryInfoWnd; /* 03CC */ UIWindow* mercenarySkillWnd; /* 03D0 */ UIWindow* autoMessageWnd; /* 03D4 */ UIWindow* newSelectCharWnd; /* 03D8 */ UIWindow* selCharForUServerWnd; /* 03DC */ UIWindow* changeNameWnd; /* 03E0 */ UIWindow* rebirthWnd; /* 03E4 */ std::uint32_t subChatHistoryWnd; /* 03E8 */ std::uint32_t secondSubChatHistoryWnd; /* 03EC */ UIWindow* battleMsgOptionWnd; /* 03F0 */ std::uint32_t subChatMiniWnd; /* 03F4 */ unsigned short chatWndStickOn; /* 03F6 */ unsigned char battleSubChatEnabled; /* 03F7 */ unsigned char padding_03F7; /* 03F8 */ UIWindow* memorialDunWnd; /* 03FC */ UIWindow* otherEquipWnd; /* 0400 */ UIWindow* modal; /* 0404 */ UIWindow* hotkeyWnd; /* 0408 */ UIWindow* escOptionWnd; /* 040C */ UIWindow* buyingShopMakeWnd; /* 0410 */ std::uint32_t buyingShopMirrorItemWnd; /* 0414 */ UIWindow* buyingShopMyItemsWnd; /* 0418 */ UIWindow* buyingShopItemsWnd; /* 041C */ UIWindow* buyingShopPurchaseWnd; /* 0420 */ std::uint32_t purchaseMirrorItemWnd; /* 0424 */ UIWindow* monsterDisplayWnd; /* 0428 */ UIWindow* questDisplayWnd; /* 042C */ UIWindow* partyInvitationToWnd; /* 0430 */ UIWindow* guildHelperWnd; /* 0434 */ UIWindow* guildTipWnd; /* 0438 */ UIWindow* createGuildWnd; /* 043C */ UIWindow* createGuildAlternateWnd; /* 0440 */ std::uint32_t padding_0440; /* 0444 */ UIWindow* clanInfoManageWnd; /* 0448 */ UIWindow* bankNewWnd; /* 044C */ UIWindow* guildStorageLogWnd; /* 0450 */ UIWindow* openMailBoxWnd; /* 0454 */ UIWindow* rodexInboxWnd; /* 0458 */ UIWindow* rodexComposeWnd; /* 045C */ UIWindow* rodexContentsWnd; /* 0460 */ UIWindow* openRoulletteWnd; /* 0464 */ UIRoulletteWnd* roulletteWnd; /* 0468 */ UIWindow* tipboxWnd; /* 046C */ int previousMouseX; /* 0470 */ int previousMouseY; /* 0474 */ int modalResponse; /* 0478 */ UIWindow* backgroundSurface; /* 047C */ int screenWidth; /* 0480 */ int screenHeight; /* 0484 */ std::string padding_0484; /* 049C */ short loginGridX; /* 049E */ short loginGridY; /* 04A0 */ POINTS loginSidePanelOffset; /* 04A4 */ POINTS loginBottomPanelOffset; /* 04A8 */ POINTS loginButtonPanelOffset; /* 04AC */ POINTS loginExtraPanelOffset; /* 04B0 */ unsigned char loginDragRegion; /* 04B1 */ unsigned char padding_04B1[3]; /* 04B4 */ int gradeImageWidth; /* 04B8 */ int gradeImageHeight; /* 04BC */ int gradeImageX; /* 04C0 */ int gradeImageY; /* 04C4 */ std::list pendingNoticeLines; /* 04CC */ std::list padding_04CC; /* 04D4 */ std::list padding_04D4; /* 04DC */ std::string chatInputText; /* 04F4 */ int padding_04F4; /* 04F8 */ int padding_04F8; /* 04FC */ int framesInvalidated; /* 0500 */ std::map namedWindows; /* 0508 */ int windowVisibilityState; /* 050C */ std::list hiddenWindows; /* 0514 */ unsigned char basicInfoPlacement[0x12]; /* 0526 */ bool basicInfoExpanded; /* 0527 */ unsigned char itemPlacementStorage[0x25]; /* 054C */ int itemWndVisible; /* 0550 */ unsigned char questPlacement[0x18]; /* 0568 */ int questWndVisible; /* 056C */ unsigned char questDisplayAndStatusPlacement[0x1C]; /* 0588 */ int statusWndVisible; /* 058C */ unsigned char equipPlacementStorage[0x18]; /* 05A4 */ int equipWndVisible; /* 05A8 */ unsigned char optionPlacement[0x14]; /* 05BC */ int optionWndVisible; /* 05C0 */ unsigned char shortenItemPlacement[0x10]; /* 05D0 */ int shortenItemWndVisible; /* 05D4 */ unsigned char padding_05D4[0x168]; /* 073C */ int messengerGroupWndVisible; /* 0740 */ unsigned char messengerPartyTabState[0x08]; /* 0748 */ NormalItemSlotWindow m_normalItemSlotWindow; /* 075C */ unsigned char exchangeAcceptAndSkillListPlacement[0x20]; /* 077C */ int skillListWndVisible; /* 0780 */ unsigned char merchantItemPlacement[0x10]; /* 0790 */ int merchantItemWndVisible; /* 0794 */ unsigned char merchantMirrorItemPlacement[0xB4]; /* 0848 */ WindowPlacement m_whisperPlacement; /* 0858 */ unsigned char padding_0858[0x94]; /* 08EC */ int homunculusSkillWndVisible; /* 08F0 */ unsigned char mercenaryInfoAndSkillPlacement[0x20]; /* 0910 */ int mercenarySkillWndVisible; /* 0914 */ unsigned char subChatPlacements[0x20]; /* 0934 */ unsigned char hotkeyPlacement[0x10]; /* 0944 */ unsigned char battlefieldPlacement[0x80]; /* 09C4 */ std::map browsers; /* 09CC */ CWebBrowser* activeBrowser; /* 09D0 */ CWebBrowser* specialBrowser; /* 09D4 */ unsigned char entryQueueStandbyPlacement[0x10]; /* 09E4 */ std::vector messageBoxes; /* 09F0 */ unsigned char padding_09F0[0x40]; /* 0A30 */ UIWindow* dropDownBoxWnd; /* 0A34 */ WindowPolicyEntry policy[10041]; /* 4F154 */ unsigned char navigationPlacement[16]; /* 4F164 */ UIWindow* replayRecordControlWnd; /* 4F168 */ UIWindow* replayControlWnd; /* 4F16C */ UIWindow* replayMessageBoxWnd; /* 4F170 */ UIWindow* secondCostumeWnd; /* 4F174 */ UIWindow* navigationWnd; /* 4F178 */ UIWindow* navigationWndX; /* 4F17C */ UIWindow* navigationWndY; /* 4F180 */ UIWindow* navigationWndWidth; /* 4F184 */ UIWindow* navigationWndHeight; /* 4F188 */ UIWindow* navigationWndVisible; /* 4F18C */ UIWindow* collectionSystemWnd; /* 4F190 */ std::map savedRectangles; /* 4F198 */ std::map overlays; /* 4F1A0 */ unsigned previousHitUid; /* 4F1A4 */ unsigned currentHitUid; /* 4F1A8 */ int miniMapClickX; /* 4F1AC */ int miniMapClickY; /* 4F1B0 */ unsigned char miniMapPlacementState[0x1C]; /* 4F1CC */ UIWindow* miniMapWnd; /* 4F1D0 */ UIWindow* editCtrlWnd; /* 4F1D4 */ UIWindow* keyboardCommandRootWnd; /* 4F1D8 */ UIWindow* achievementTracingWndX; /* 4F1DC */ UIWindow* achievementTracingWndY; /* 4F1E0 */ int visible_276; /* 4F1E4 */ UIWindow* roundBoxTooltipWnd; /* 4F1E8 */ UIWindow* captchaRegisterWnd; /* 4F1EC */ UIWindow* macroDetectorWnd; /* 4F1F0 */ UIWindow* macroReporterWnd; /* 4F1F4 */ UIWindow* macroUserInfoWnd; /* 4F1F8 */ UIWindow* captchaPreviewWnd; /* 4F1FC */ UIWindow* macroDetectorEditWnd; /* 4F200 */ unsigned char macroReporterPlacement[16]; /* 4F210 */ bool macroReporterVisible; /* 4F211 */ bool padding_4F211; /* 4F214 */ std::vector padding_4F214; /* 4F220 */ unsigned char previewEquipPlacement[0x18]; /* 4F238 */ int miniPartyWidth; /* 4F23C */ int miniPartyHeight; /* 4F240 */ std::list snapExcluded; /* 4F248 */ std::list closedMiniPartyIds; /* 4F250 */ UIWindow* transientWnd; /* 4F254 */ UIWindow* cashShopWnd; /* 4F258 */ UIWindow* privateAirplaneWnd; /* 4F25C */ UIWindow* rpImageWnd2; /* 4F260 */ UIWindow* barterMarketWnd; /* 4F264 */ UIWindow* barterItemPurchaseWnd; /* 4F268 */ UIWindow* expandedBarterMarketWnd; /* 4F26C */ UIWindow* expandedBarterItemPurchaseWnd; /* 4F270 */ UIWindow* registerPartyWnd; /* 4F274 */ UIWindow* advenPartyBoardWnd; /* 4F278 */ UIWindow* requestJoinPartyWnd; /* 4F27C */ UIWindow* applyForPartyWnd; /* 4F280 */ std::list savedWindowIds; /* 4F288 */ UIWindow* macroBlackListCheckWnd; /* 4F28C */ std::unordered_set deferredDeletion; /* 4F2AC */ UIWindow* waitDBSaveWnd; virtual ~UIWindowMgr(); UIWindowMgr(); void InitializeWindowPolicy(); int WindowPolicy(int action, unsigned int id) const; void ResetWindows(); void Shutdown(); void ClearMapWindows(); void SetScreenSize(int width, int height); void ArrangeMiniPartyWindows(); __declspec(noinline) void AddMiniPartyWindow(UIWindow* window); void RearrangeMiniPartyWindows(); void RebuildMiniPartyWindows(); void RestoreMiniPartyWindows(); static int ScaleToViewportWidth(int value); static int CenterOnViewportX(int x); static int CenterOnViewportY(int y); void ConfirmActiveDialog(); void SaveVisibleWindowIds(); void UpdateNavigationList(); void LoadShortcutItems(); void SaveShortcutItems(); void LoadUIRectInfo(); void SaveUIRectInfo(); void ResetUIRectInfo(); UIWindow* LookupWindow(int id); void Promote(UIWindow* window); void InvalidateFrames(); UIWindow* FindRenderedUid(std::uint32_t uid); UIWindow* HitTestWindows(int x, int y); void ShowDropDown(UIWindow* owner, UIWindow* child, int x, int y); bool CloseDropDown(); void RefreshGameSettingOption(int option); void RefreshGameSettings(); void RefreshGameSettingHotkeys(); UIWindow* EnsureWindow(int id); UIWindow* CreateLayoutWindow(int id); RECT GetMiniPartyUsableArea(); __declspec(noinline) UIWindow* FindSnapExcludedWindow(int cell); void Schedule(UIWindow* window); __declspec(noinline) void AddRendered(UIWindow* window); void RegisterWindow(UIWindow* window); void UnregisterWindow(UIWindow* window); void InvalidateRegisteredWindows(); void SetChatInputText(const char* text); void Destroy(UIWindow* window); void ForgetWindowReferences(UIWindow* removed); void DeferDeletion(UIWindow* window); UIWindow* Top() const; void RestoreInput(); int Confirm(const char* text, int type, int defaultAccept, bool replace, int timeout, const char* caption, int width, int height, unsigned char protect); void AddMessageBox( const char* text, int type, int defaultAccept, int unused, int timeout, const char* caption, int width, int height, const char* icon, bool track ); int RunModal(UIWindow* window); int RunEmailAddress(); void DismissTransient(); void MoveTransient(int x, int y); void RetireTransientWindow(); void ClearPreviousMouseWnd(); void ClearChatInputText(); int ProcessMouse(); void UpdateFrameWindows(); CWebBrowser* CreateBrowser(int width, int height); CWebBrowser* EnsureSpecialBrowser(int width, int height); CWebBrowser* FindBrowser(HWND window); void RemoveBrowser(HWND window); bool CloseWindow(int id); void CloseWindowExcept251(int id); void RecordWindowPacket(int argument); void Nullsub370(); void RegisterNamedWindow(std::string name, UIWindow* window); void UnregisterNamedWindow(std::string name); void ShowTransient(UIWindow* window); void RequestAddFriend(const char* name); void AddOverlay(int id, UIWindow* window); void AddRenderedFront(UIWindow* window); void ShowWindows189(unsigned char show); void DestroyPersistentWindows(); void RemoveSnapRectangle(UIWindow* window); void StoreSnapRectangle(UIWindow* window); void ConstrainSnap(UIWindow* window, int& dx, int& dy, int groupMember); void ReleaseRetainedWindow(int id); void InvalidateAll(); void RefreshClanWnd(); void RefreshGuildWindows(); void RefreshRouletteWnd(); void EnableRouletteWnd(); char UpdateSnapRectangles(); bool ProcessDialogKey(int unused, int key); void DestroyBackgroundSurface(); void SubmitActiveDialog(); void NotifyMode(); void NotifyItemWindows(int accountId, int lower, int upper); UIWindow* FindItemWindow(int accountId); void NotifyMemberWindows(const MessengerMember* target); int SendMsg(int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4, std::intptr_t argument5); bool IsOrderFixed(int id); __declspec(noinline) void RemoveOrder(int id); void BringToFront(int id); void CloseMiniPartyWindow(int id); bool ProcessEnterKey(); UIWindow* OpenSubChatWindow(int id, int x, int y, int width, int height); void SetCapture(UIWindow* window); void ReleaseCapture(); UIWindow* Capture() const; void SendMsgToNamedWindow(const char* name); void SetWindows189Visible(unsigned char show); void ShowWindowsWithId(int id, unsigned char show); void NotifyHoverWindow(); UIWindow* GetGuildWindow(); int FindMiniPartyCell(); UIWindow* GetHoverWindow(); int GetRenderedWindowIds(int* ids); void HideChatWnd(); bool DropAt(int x, int y, ModeDragState* drag); void FocusWindow01C8Edit(); void SetFocus(UIWindow* value); void FocusFirst(); void FocusLast(); void FocusNext(); bool IsLastFocus(UIWindow* value); void FocusPrevious(); void RefreshFocus(UIWindow* const& excludedRoot); void SetPressedWindowRoot(UIWindow* window); bool IsHoverOnWindow01C8Button(); void SelectWhisperName(const char* name); void AddWhisperName(const char* name); int ShowWhisperFrom(const char* name, const char* text, int color, std::uint32_t accountId); void RefreshFrameSkins(); bool IsDropDownChild(const UIWindow* window); bool HasMiniPartyMember(std::uint32_t accountId); bool IsHoverParentVisible(); int IsFriend(const char* name); bool IsSharedWindowId(int id); bool HasNavigationBlocker(); int Window4F250Ready(); bool HasPendingDialog(); bool HasTitleAtActorCell(std::uint32_t aid); void CancelActiveDialog(); void DrawCenteredBackground(); void DrawLoginOverlay(); void DrawWindows(); void RefreshWindow01C8Edits(); void SetBackgroundSurface(CBitmapRes* bitmap); void SendFlagEffect(int message); void RestoreHiddenWindows(); std::vector SaveReplaySettings(); std::vector SaveReplayReserved(); void ApplyReplayOptions(const ReplayOptions& options); int LoadReplaySettings(const std::vector& data); int LoadReplayReserved(const std::vector& data); int LoadReplayWindows(const std::vector& data); void CycleWindowVisibility(int unused); void CycleWindowVisibilityTwice(); bool ShowWindowById(int id, int visible); bool ShowShortcutWindow(int value); void BroadcastMessage21(); bool HasModalWindow(); int TranslateHotkey(int key, int keyData); int GetHotkeyBehavior(); std::vector SaveReplayWindows(); bool ProcessHotkeyAction(int action, int pressed); bool ProcessShortcutKey(int action); bool ProcessKeyDown(int key, int keyData, int pressed); void ShowWaitDBSaveWindow(); void SendEmotionHotkey(int index); }; extern UIWindowMgr g_windowMgr; extern int g_renderDiagnosticLine; extern const char* g_renderDiagnosticFile; extern bool g_windowToggleFlag; extern bool g_randomLoadingScreen; extern int g_windowCloseValue; extern int g_savedWindowCloseValue; void __fastcall RefreshItemWindows(UIWindowMgr* mgr); #if defined(_WIN32) && !defined(_WIN64) static_assert(sizeof(WindowTextEntry) == 0x1C); static_assert(sizeof(WindowTextRecord) == 0x20); static_assert(sizeof(SavedWindowRectangle) == 0x10); static_assert(sizeof(WindowPolicyEntry) == 0x20); static_assert(offsetof(UIWindowMgr, windows) == 0x8); static_assert(offsetof(UIWindowMgr, windowHistory) == 0x18); static_assert(offsetof(UIWindowMgr, retainedWindows) == 0x28); static_assert(offsetof(UIWindowMgr, persistentWindows) == 0x170); static_assert(offsetof(UIWindowMgr, rendered) == 0x17C); static_assert(offsetof(UIWindowMgr, retired) == 0x184); static_assert(offsetof(UIWindowMgr, registeredWindows) == 0x18C); static_assert(offsetof(UIWindowMgr, snapRectangles) == 0x194); static_assert(offsetof(UIWindowMgr, modalWindows) == 0x1A4); static_assert(offsetof(UIWindowMgr, chatWnd) == 0x1C8); static_assert(offsetof(UIWindowMgr, shortCutWnd) == 0x1E8); static_assert(offsetof(UIWindowMgr, skillDescribeWnd) == 0x230); static_assert(offsetof(UIWindowMgr, modal) == 0x400); static_assert(offsetof(UIWindowMgr, padding_0484) == 0x484); static_assert(offsetof(UIWindowMgr, pendingNoticeLines) == 0x4C4); static_assert(offsetof(UIWindowMgr, padding_04CC) == 0x4CC); static_assert(offsetof(UIWindowMgr, padding_04D4) == 0x4D4); static_assert(offsetof(UIWindowMgr, chatInputText) == 0x4DC); static_assert(offsetof(UIWindowMgr, namedWindows) == 0x500); static_assert(offsetof(UIWindowMgr, hiddenWindows) == 0x50C); static_assert(offsetof(UIWindowMgr, browsers) == 0x9C4); static_assert(offsetof(UIWindowMgr, messageBoxes) == 0x9E4); static_assert(offsetof(UIWindowMgr, policy) == 0xA34); static_assert(offsetof(UIWindowMgr, savedRectangles) == 0x4F190); static_assert(offsetof(UIWindowMgr, overlays) == 0x4F198); static_assert(offsetof(UIWindowMgr, padding_4F214) == 0x4F214); static_assert(offsetof(UIWindowMgr, snapExcluded) == 0x4F240); static_assert(offsetof(UIWindowMgr, closedMiniPartyIds) == 0x4F248); static_assert(offsetof(UIWindowMgr, savedWindowIds) == 0x4F280); static_assert(offsetof(UIWindowMgr, deferredDeletion) == 0x4F28C); static_assert(offsetof(UIWindowMgr, waitDBSaveWnd) == 0x4F2AC); static_assert(sizeof(UIWindowMgr) == 0x4F2B0); #endif #endif