Maintenance: [forced, user-approved] Family G19: remove WindowOrdering, WindowDropDown, WindowMouseHit and the dead WindowMouseCaptur
Batch #10231 by ragnarok-clanker: forced by an admin (5 lower score(s), 39 changed function(s)); checked with 495 compiled unit(s), including every includer of Source/Client/Mode/ModeTooltip.h, Source/UI/AdventureGuide/UIAdventureGuide.h, Source/UI/Lists/UIDropDownBox.h, Source/UI/Window/UIWindowMgr.h, Source/UI/Window/UIWindowMgr.inl, Source/UI/Window/WindowMouseHit.h, Source/UI/Window/WindowOrdering.h. Deletes: Source/UI/Window/WindowOrdering.h
This commit is contained in:
parent
9b04a3cae5
commit
70f3e36c88
29 changed files with 95 additions and 353 deletions
|
|
@ -2,7 +2,7 @@
|
|||
#include "Client/Mode/CMode.h"
|
||||
#include "Client/Mode/ModeTooltip.h"
|
||||
#include "UI/Text/UITransBalloonText.h"
|
||||
#include "UI/Window/WindowOrdering.h"
|
||||
#include "UI/Window/UIWindowMgr.h"
|
||||
#include "UI/Window/UIWindowMgr.h"
|
||||
|
||||
#include <cstring>
|
||||
|
|
|
|||
|
|
@ -6,14 +6,14 @@
|
|||
|
||||
class UITransBalloonText;
|
||||
class UIWindow;
|
||||
struct WindowOrdering;
|
||||
class UIWindowMgr;
|
||||
class UIWindowMgr;
|
||||
|
||||
struct ModeTooltip {
|
||||
UITransBalloonText*& window;
|
||||
std::uint32_t& tick;
|
||||
std::list<UIWindow*>& rendered;
|
||||
WindowOrdering& ordering;
|
||||
UIWindowMgr& ordering;
|
||||
const int& screenWidth;
|
||||
const int& screenHeight;
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
#include "UI/Window/UIBasicInfoWnd.h"
|
||||
#include "UI/Window/UIWindowMgr.h"
|
||||
#include "UI/Window/UIWindow.h"
|
||||
#include "UI/Window/WindowOrdering.h"
|
||||
#include "Contents/Configuration/ServiceOptions.h"
|
||||
#include "Contents/Configuration/ServiceConfiguration.h"
|
||||
#include "Client/Application/ErrorDialog.h"
|
||||
|
|
@ -2606,7 +2605,7 @@ void CSession::RefreshSkillTree() {
|
|||
// OFFSET: 0x00DF9500
|
||||
// FUNCTION: fn_23518
|
||||
void CSession::InvalidateWindowFrames() {
|
||||
reinterpret_cast<WindowOrdering&>(g_windowMgr).InvalidateFrames(g_windowMgr.unknown_04FC);
|
||||
g_windowMgr.InvalidateFrames();
|
||||
}
|
||||
|
||||
// OFFSET: 0x00DE3670
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@
|
|||
#include "UI/Items/UIEquipWnd.h"
|
||||
#include "UI/Window/UIWindow.h"
|
||||
#include "UI/Window/UIWindowMgr.h"
|
||||
#include "UI/Window/WindowOrdering.h"
|
||||
#include "Utility/Text/FormatString.h"
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
|
@ -1189,7 +1188,7 @@ bool CSession::EquipUnknown17F0(const ITEM_INFO& item, const char* name) {
|
|||
g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr;
|
||||
}
|
||||
g_equipmentPropertiesMgr->EquipWearable(&item, *name == '\0');
|
||||
reinterpret_cast<WindowOrdering&>(g_windowMgr).InvalidateFrames(g_windowMgr.unknown_04FC);
|
||||
g_windowMgr.InvalidateFrames();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -1222,7 +1221,7 @@ bool CSession::OnItemEquipped(ITEM_INFO& item) {
|
|||
g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr;
|
||||
}
|
||||
g_equipmentPropertiesMgr->EquipWearable(&item, true);
|
||||
reinterpret_cast<WindowOrdering&>(g_windowMgr).InvalidateFrames(g_windowMgr.unknown_04FC);
|
||||
g_windowMgr.InvalidateFrames();
|
||||
}
|
||||
|
||||
if (item.unknown_0000[3] != 0x8000) {
|
||||
|
|
@ -1262,7 +1261,7 @@ bool CSession::UnequipItem(int location, std::uint32_t identity) {
|
|||
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(FormatOwnedString("%s%s", item.DisplayName(0).c_str(), LookupMessage(0xAB)).c_str()), 0xFF, 7, 0, 0);
|
||||
}
|
||||
this->unknown_16EC = 0;
|
||||
reinterpret_cast<WindowOrdering&>(g_windowMgr).InvalidateFrames(g_windowMgr.unknown_04FC);
|
||||
g_windowMgr.InvalidateFrames();
|
||||
|
||||
CGameMode* mode = static_cast<CGameMode*>(g_modeMgr.GetGameMode());
|
||||
if (mode != nullptr) {
|
||||
|
|
@ -1319,7 +1318,7 @@ bool CSession::UnequipItem(int location, std::uint32_t identity) {
|
|||
g_equipmentPropertiesMgr = new (std::nothrow) EquipmentProperties::CEquipmentPropertiesMgr;
|
||||
}
|
||||
g_equipmentPropertiesMgr->UnequipWearable(location);
|
||||
reinterpret_cast<WindowOrdering&>(g_windowMgr).InvalidateFrames(g_windowMgr.unknown_04FC);
|
||||
g_windowMgr.InvalidateFrames();
|
||||
if (UIWindow* window = g_windowMgr.unknown_022C) {
|
||||
window->SendMsg(nullptr, 60, 0, 0, 0, 0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
#include "Script/LuaInstance.h"
|
||||
#include "UI/Window/UIWindow.h"
|
||||
#include "UI/Window/UIWindowMgr.h"
|
||||
#include "UI/Window/WindowOrdering.h"
|
||||
#include "Resource/World/TerrainResource.h"
|
||||
#include "Contents/Actors/Pc.h"
|
||||
#include "Client/Application/ErrorDialog.h"
|
||||
|
|
@ -5597,7 +5596,7 @@ void SessionMessengerContext::ResetEquipment() {
|
|||
}
|
||||
RequestBasicInfoRefresh();
|
||||
EquipmentProperties::CEquipmentPropertiesMgr::GetInstance()->Clear();
|
||||
reinterpret_cast<WindowOrdering&>(g_windowMgr).InvalidateFrames(g_windowMgr.unknown_04FC);
|
||||
g_windowMgr.InvalidateFrames();
|
||||
}
|
||||
|
||||
// OFFSET: 0x00DD8660
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@
|
|||
#include "UI/Navigation/UINavigationV4Wnd.h"
|
||||
#include "UI/Window/UINavigationWnd.h"
|
||||
#include "UI/Window/UIWindowMgr.h"
|
||||
#include "UI/Window/WindowOrdering.h"
|
||||
#include "UI/Window/UIPayConfirmWnd.h"
|
||||
#include "UI/Window/WindowDialogs.h"
|
||||
#include "Utility/RegistryKey.h"
|
||||
|
|
@ -756,7 +755,7 @@ bool CNavigationManager::sub_B995D0(std::string name, int type, bool flag) {
|
|||
}
|
||||
}
|
||||
|
||||
reinterpret_cast<WindowOrdering&>(g_windowMgr).Promote(g_navigationWindow);
|
||||
g_windowMgr.Promote(g_navigationWindow);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
#include "UI/Party/UIApplyForPartyWnd.h"
|
||||
#include "UI/Window/UINewSelectCharWnd.h"
|
||||
#include "UI/Window/UIWindowMgr.h"
|
||||
#include "UI/Window/WindowOrdering.h"
|
||||
|
||||
#include <json/reader.h>
|
||||
#include <json/value.h>
|
||||
|
|
@ -71,7 +70,7 @@ void CAdventurerAgencyMgr::CompletePartyInfo(AsyncDiagnostic diagnostic, std::st
|
|||
|
||||
if (application) {
|
||||
application->SetInfo(info);
|
||||
reinterpret_cast<WindowOrdering&>(g_windowMgr).Promote(application);
|
||||
g_windowMgr.Promote(application);
|
||||
}
|
||||
|
||||
if (info.minimumLevel > g_session.m_level || info.maximumLevel < g_session.m_level) {
|
||||
|
|
|
|||
|
|
@ -124,7 +124,6 @@
|
|||
#include "UI/Window/FuncDrawWNDChar.h"
|
||||
#include "UI/Lists/UITabControl.h"
|
||||
#include "UI/Window/WindowManagerWindows.h"
|
||||
#include "UI/Window/WindowOrdering.h"
|
||||
#include "Utility/Text/FormatString.h"
|
||||
#include "Utility/Text/TextTokens.h"
|
||||
#include "Contents/PlayerNameDictionary.h"
|
||||
|
|
@ -2175,7 +2174,7 @@ int UIMenuWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intp
|
|||
void UITipboxWnd::ShowTip(int id) {
|
||||
g_itemTagOwner->SelectTip(id);
|
||||
this->SendMsg(this, 6, 543, 0, 0, 0);
|
||||
reinterpret_cast<WindowOrdering&>(g_windowMgr).Promote(this);
|
||||
g_windowMgr.Promote(this);
|
||||
}
|
||||
|
||||
// OFFSET: 0x008F5AF0
|
||||
|
|
@ -3075,7 +3074,7 @@ int UIEquipWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::int
|
|||
this->Resize(this->geometry.width, 17);
|
||||
}
|
||||
g_windowMgr.StoreSnapRectangle(this);
|
||||
WindowOrdering{g_windowMgr.rendered, g_windowMgr, reinterpret_cast<const int&>(g_windowMgr.modal), g_windowMgr.window_4F174}.Promote(this);
|
||||
g_windowMgr.Promote(this);
|
||||
const int delta = this->geometry.height - height;
|
||||
if (delta != 0) {
|
||||
g_snapMgr.MoveEdge(this, 0, delta, 3);
|
||||
|
|
@ -3499,7 +3498,7 @@ int UIBookWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intp
|
|||
}
|
||||
}
|
||||
this->Invalidate();
|
||||
reinterpret_cast<WindowOrdering&>(g_windowMgr).Promote(this);
|
||||
g_windowMgr.Promote(this);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -5353,7 +5352,7 @@ int UIMonsterDisplayWnd::SendMsg(UIWindow* sender, int message, std::intptr_t ar
|
|||
if (message == 62) {
|
||||
this->m_name = reinterpret_cast<const char*>(argument1);
|
||||
this->Invalidate();
|
||||
reinterpret_cast<WindowOrdering&>(g_windowMgr).Promote(this);
|
||||
g_windowMgr.Promote(this);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -5367,7 +5366,7 @@ int UINotifyJobLevelUpWnd::SendMsg(UIWindow* sender, int message, std::intptr_t
|
|||
return UIWindow::SendMsg(sender, message, a, b, c, d);
|
||||
}
|
||||
if (a == 192) {
|
||||
reinterpret_cast<WindowOrdering&>(g_windowMgr).Promote(g_windowMgr.EnsureWindow(37));
|
||||
g_windowMgr.Promote(g_windowMgr.EnsureWindow(37));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -5673,7 +5672,7 @@ int UINotifyQuestWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st
|
|||
}
|
||||
if (a == 192) {
|
||||
if (UIWindow* window = g_windowMgr.EnsureWindow(0x2718)) {
|
||||
reinterpret_cast<WindowOrdering&>(g_windowMgr).Promote(window);
|
||||
g_windowMgr.Promote(window);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
|
@ -5765,7 +5764,7 @@ int UINotifyLevelUpWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a,
|
|||
if (window->geometry.height == 17) {
|
||||
window->SendMsg(nullptr, 6, 0xCA, 0, 0, 0);
|
||||
}
|
||||
reinterpret_cast<WindowOrdering&>(g_windowMgr).Promote(window);
|
||||
g_windowMgr.Promote(window);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -6985,7 +6984,7 @@ int UISkillDescribeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a,
|
|||
if (window) {
|
||||
static_cast<CUISkillDelayInfo*>(window)->SetSkill(this->m_skillId);
|
||||
window->PlaceBeside(this);
|
||||
WindowOrdering{g_windowMgr.rendered, *reinterpret_cast<WindowManagerWindows*>(&g_windowMgr), reinterpret_cast<const int&>(g_windowMgr.modal), g_windowMgr.window_4F174}.Promote(window);
|
||||
g_windowMgr.Promote(window);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
|
@ -7067,7 +7066,7 @@ int UISkillDescribeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a,
|
|||
this->m_viewer->Resize(this->m_viewer->geometry.width, viewerHeight);
|
||||
this->Resize(this->geometry.width, total + 6);
|
||||
this->Invalidate();
|
||||
WindowOrdering{g_windowMgr.rendered, *reinterpret_cast<WindowManagerWindows*>(&g_windowMgr), reinterpret_cast<const int&>(g_windowMgr.modal), g_windowMgr.window_4F174}.Promote(this);
|
||||
g_windowMgr.Promote(this);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -7306,7 +7305,7 @@ int UIStatusWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::in
|
|||
this->Resize(this->geometry.width, 17);
|
||||
}
|
||||
g_windowMgr.StoreSnapRectangle(this);
|
||||
reinterpret_cast<WindowOrdering&>(g_windowMgr).Promote(this);
|
||||
g_windowMgr.Promote(this);
|
||||
const int delta = this->geometry.height - height;
|
||||
if (delta != 0) {
|
||||
g_snapMgr.MoveEdge(this, 0, delta, 3);
|
||||
|
|
@ -8172,7 +8171,7 @@ int UICardItemIllustWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a,
|
|||
this->m_bitmapPath += name;
|
||||
this->m_bitmapPath += ".bmp";
|
||||
this->Invalidate();
|
||||
reinterpret_cast<WindowOrdering&>(g_windowMgr).Promote(this);
|
||||
g_windowMgr.Promote(this);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2687,7 +2687,7 @@ void CUIMonster::SearchNavigation() {
|
|||
g_navigationManager.ClearSavedTarget();
|
||||
g_windowMgr.CloseWindow(314);
|
||||
static_cast<UINavigationV4Wnd*>(g_navigationWindow)->RefreshLayout();
|
||||
reinterpret_cast<WindowOrdering&>(g_windowMgr).Promote(g_windowMgr.LookupWindow(203));
|
||||
g_windowMgr.Promote(g_windowMgr.LookupWindow(203));
|
||||
} else {
|
||||
g_windowMgr.EnsureWindow(203);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
#include "UI/Navigation/UINavigationV4Wnd.h"
|
||||
#include "UI/Window/UIControl.h"
|
||||
#include "UI/Window/UINavigationWnd.h"
|
||||
#include "UI/Window/WindowOrdering.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
#include "Resource/SkinPalette.h"
|
||||
#include "Contents/Configuration/GameSettingsMgr.h"
|
||||
#include "UI/Layout/SnapMgr.h"
|
||||
#include "UI/Window/WindowOrdering.h"
|
||||
#include "Contents/SkinMgr.h"
|
||||
#include "Resource/TextureNames.h"
|
||||
#include "Resource/Bitmap/BitmapImage.h"
|
||||
|
|
@ -7727,7 +7726,7 @@ int UIItemWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intp
|
|||
this->Resize(this->geometry.width, 17);
|
||||
}
|
||||
g_windowMgr.StoreSnapRectangle(this);
|
||||
reinterpret_cast<WindowOrdering&>(g_windowMgr).Promote(this);
|
||||
g_windowMgr.Promote(this);
|
||||
const int delta = this->geometry.height - height;
|
||||
if (delta != 0) {
|
||||
g_snapMgr.MoveEdge(this, 0, delta, 3);
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@
|
|||
#include "UI/Window/UIRoulletteWnd.h"
|
||||
#include "UI/Lists/UIDropDownBox.h"
|
||||
#include "UI/Window/UIWindowMgr.h"
|
||||
#include "UI/Window/WindowOrdering.h"
|
||||
#include "UI/Window/WindowBorder.h"
|
||||
#include "Utility/Cipher/XorBytes.h"
|
||||
#include "Utility/Text/StringUtil.h"
|
||||
|
|
@ -195,12 +194,11 @@ void GameSettingsUI::CUIGroupSkin::Slot15(int width, int height) {
|
|||
combo->unknown_0088->Move(combo->geometry.width - 18, 0);
|
||||
combo->unknown_0088->SetImages(normalName, hoverName, pressedName, disabledName);
|
||||
combo->unknown_0088->SetOnClick([combo]() {
|
||||
WindowDropDown dropDown{reinterpret_cast<WindowOrdering&>(g_windowMgr), reinterpret_cast<CUIDropDownBox*&>(g_windowMgr.window_0A30)};
|
||||
if (!dropDown.Close()) {
|
||||
if (!g_windowMgr.CloseDropDown()) {
|
||||
int x = 0;
|
||||
int y = combo->geometry.height - 1;
|
||||
combo->ToScreen(x, y);
|
||||
dropDown.Show(combo, combo->listBox, x, y);
|
||||
g_windowMgr.ShowDropDown(combo, combo->listBox, x, y);
|
||||
}
|
||||
});
|
||||
combo->AddChild(combo->unknown_0088);
|
||||
|
|
@ -308,13 +306,11 @@ template <class T, class D> void CUIComboBox<T, D>::Create(int width, int itemHe
|
|||
this->button->SetSize(display->geometry.width, display->geometry.height);
|
||||
this->button->Move(display->geometry.x, display->geometry.y);
|
||||
this->button->SetOnClick([this]() {
|
||||
WindowOrdering ordering{g_windowMgr.rendered, *reinterpret_cast<WindowManagerWindows*>(&g_windowMgr), reinterpret_cast<const int&>(g_windowMgr.modal), g_windowMgr.window_4F174};
|
||||
WindowDropDown dropDown{ordering, reinterpret_cast<CUIDropDownBox*&>(g_windowMgr.window_0A30)};
|
||||
if (!dropDown.Close()) {
|
||||
if (!g_windowMgr.CloseDropDown()) {
|
||||
int x = 0;
|
||||
int y = this->geometry.height - 1;
|
||||
this->ToScreen(x, y);
|
||||
dropDown.Show(this, this->listBox, x, y);
|
||||
g_windowMgr.ShowDropDown(this, this->listBox, x, y);
|
||||
}
|
||||
});
|
||||
this->AddChild(this->button);
|
||||
|
|
@ -325,9 +321,7 @@ template <class T, class D> void CUIComboBox<T, D>::Create(int width, int itemHe
|
|||
this->listBox->SetSize(this->width + 13, this->itemHeight);
|
||||
this->listBox->Move(1, 1);
|
||||
this->listBox->SetOnSelect([this, display](T* item, const D& value) {
|
||||
WindowOrdering ordering{g_windowMgr.rendered, *reinterpret_cast<WindowManagerWindows*>(&g_windowMgr), reinterpret_cast<const int&>(g_windowMgr.modal), g_windowMgr.window_4F174};
|
||||
WindowDropDown dropDown{ordering, reinterpret_cast<CUIDropDownBox*&>(g_windowMgr.window_0A30)};
|
||||
dropDown.Close();
|
||||
g_windowMgr.CloseDropDown();
|
||||
if (this->onChange) {
|
||||
this->onChange(display, value);
|
||||
}
|
||||
|
|
@ -387,12 +381,11 @@ void CUIComboBox<T, D>::SetButton(const std::string& normal, const std::string&
|
|||
this->unknown_0088->Move(this->geometry.width - 18, 0);
|
||||
this->unknown_0088->SetImages(normal, hover, pressed, disabled);
|
||||
this->unknown_0088->SetOnClick([this]() {
|
||||
WindowDropDown dropDown{reinterpret_cast<WindowOrdering&>(g_windowMgr), reinterpret_cast<CUIDropDownBox*&>(g_windowMgr.window_0A30)};
|
||||
if (!dropDown.Close()) {
|
||||
if (!g_windowMgr.CloseDropDown()) {
|
||||
int x = 0;
|
||||
int y = this->geometry.height - 1;
|
||||
this->ToScreen(x, y);
|
||||
dropDown.Show(this, this->listBox, x, y);
|
||||
g_windowMgr.ShowDropDown(this, this->listBox, x, y);
|
||||
}
|
||||
});
|
||||
this->AddChild(this->unknown_0088);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include "Render/DeviceContext/DeviceContext.h"
|
||||
#include "UI/Lists/UIDropDownBox.h"
|
||||
#include "UI/Window/UIWindowMgr.h"
|
||||
#include "UI/Window/WindowBorder.h"
|
||||
#include "UI/Window/WindowOrdering.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
|
|
@ -63,37 +63,39 @@ void CUIDropDownBox::Paint() {
|
|||
|
||||
// OFFSET: 0x00AA27B0
|
||||
// FUNCTION: fn_17217
|
||||
void WindowDropDown::Show(UIWindow* owner, UIWindow* child, int x, int y) {
|
||||
if (this->popup && this->popup->geometry.visible != 0) {
|
||||
this->popup->Detach();
|
||||
this->popup->Show(0);
|
||||
void UIWindowMgr::ShowDropDown(UIWindow* owner, UIWindow* child, int x, int y) {
|
||||
CUIDropDownBox*& popup = popup;
|
||||
if (popup && popup->geometry.visible != 0) {
|
||||
popup->Detach();
|
||||
popup->Show(0);
|
||||
}
|
||||
|
||||
if (!this->popup) {
|
||||
this->popup = new CUIDropDownBox();
|
||||
if (!popup) {
|
||||
popup = new CUIDropDownBox();
|
||||
}
|
||||
|
||||
this->popup->Attach(owner, child);
|
||||
this->popup->Move(x, y);
|
||||
popup->Attach(owner, child);
|
||||
popup->Move(x, y);
|
||||
|
||||
auto& rendered = this->ordering.rendered;
|
||||
if (std::find(rendered.begin(), rendered.end(), this->popup) == rendered.end()) {
|
||||
rendered.push_back(this->popup);
|
||||
auto& rendered = this->rendered;
|
||||
if (std::find(rendered.begin(), rendered.end(), popup) == rendered.end()) {
|
||||
rendered.push_back(popup);
|
||||
} else {
|
||||
this->ordering.Promote(this->popup);
|
||||
this->Promote(popup);
|
||||
}
|
||||
|
||||
this->popup->Show(1);
|
||||
popup->Show(1);
|
||||
}
|
||||
|
||||
// OFFSET: 0x00A8C750
|
||||
// FUNCTION: fn_17133
|
||||
bool WindowDropDown::Close() {
|
||||
if (!this->popup || this->popup->geometry.visible == 0) {
|
||||
bool UIWindowMgr::CloseDropDown() {
|
||||
CUIDropDownBox* popup = static_cast<CUIDropDownBox*>(this->window_0A30);
|
||||
if (!popup || popup->geometry.visible == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this->popup->Detach();
|
||||
this->popup->Show(0);
|
||||
popup->Detach();
|
||||
popup->Show(0);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include "UI/Window/UIControl.h"
|
||||
|
||||
struct WindowOrdering;
|
||||
|
||||
class CUIDropDownBox : public CUIControl {
|
||||
public:
|
||||
|
|
@ -18,14 +17,6 @@ public:
|
|||
/* 0080 */ UIWindow* owner;
|
||||
};
|
||||
|
||||
struct WindowDropDown {
|
||||
WindowOrdering& ordering;
|
||||
CUIDropDownBox*& popup;
|
||||
|
||||
void Show(UIWindow* owner, UIWindow* child, int x, int y);
|
||||
bool Close();
|
||||
};
|
||||
|
||||
#if defined(_WIN32) && !defined(_WIN64)
|
||||
static_assert(sizeof(CUIDropDownBox) == 136);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
#include "UI/Window/UIWindow.h"
|
||||
#include "UI/Window/WindowDialogs.h"
|
||||
#include "UI/Window/WindowManagerWindows.h"
|
||||
#include "UI/Window/WindowOrdering.h"
|
||||
#include <new>
|
||||
|
||||
// OFFSET: 0x007435C0
|
||||
|
|
@ -154,10 +153,9 @@ void UIWindowMgr::RebuildMiniPartyWindows() {
|
|||
}
|
||||
}
|
||||
|
||||
WindowOrdering ordering{this->rendered, *this, reinterpret_cast<const int&>(this->modal), this->window_4F174};
|
||||
if (this->Window4F250Ready()) {
|
||||
ordering.Promote(this->window_4F250);
|
||||
this->Promote(this->window_4F250);
|
||||
}
|
||||
|
||||
ordering.Promote(this->unknown_0210);
|
||||
this->Promote(this->unknown_0210);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
#include "UI/Text/UIStaticText.h"
|
||||
#include "Render/Renderer.h"
|
||||
#include "UI/Window/UIWindowMgr.h"
|
||||
#include "UI/Window/WindowOrdering.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cctype>
|
||||
|
|
@ -474,7 +473,7 @@ int UIAdvenPartyBoardWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a
|
|||
|
||||
if (window) {
|
||||
window->SetInfo(info);
|
||||
reinterpret_cast<WindowOrdering&>(g_windowMgr).Promote(window);
|
||||
g_windowMgr.Promote(window);
|
||||
}
|
||||
} else {
|
||||
g_windowMgr.CloseWindow(323);
|
||||
|
|
@ -482,7 +481,7 @@ int UIAdvenPartyBoardWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a
|
|||
|
||||
if (window) {
|
||||
window->SetInfo(info);
|
||||
reinterpret_cast<WindowOrdering&>(g_windowMgr).Promote(window);
|
||||
g_windowMgr.Promote(window);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -502,7 +501,7 @@ int UIAdvenPartyBoardWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a
|
|||
|
||||
if (window) {
|
||||
window->SetInfo(this->ownParty->info);
|
||||
reinterpret_cast<WindowOrdering&>(g_windowMgr).Promote(window);
|
||||
g_windowMgr.Promote(window);
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
@ -512,7 +511,7 @@ int UIAdvenPartyBoardWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a
|
|||
UIWindow* window = g_windowMgr.EnsureWindow(323);
|
||||
|
||||
if (window) {
|
||||
reinterpret_cast<WindowOrdering&>(g_windowMgr).Promote(window);
|
||||
g_windowMgr.Promote(window);
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
#include "UI/Window/UIWindow.h"
|
||||
#include "UI/Window/UIWindowMgr.h"
|
||||
#include "UI/Window/UIWindowMgr.inl"
|
||||
#include "UI/Window/WindowOrdering.h"
|
||||
|
||||
// OFFSET: 0x00AAA310
|
||||
// FUNCTION: fn_17269
|
||||
|
|
@ -28,7 +27,7 @@ bool UIWindowMgr::ShowWindowById(int id, int visible) {
|
|||
return true;
|
||||
}
|
||||
|
||||
reinterpret_cast<WindowOrdering&>(g_windowMgr).Promote(window);
|
||||
g_windowMgr.Promote(window);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -40,7 +39,7 @@ bool UIWindowMgr::ShowWindowById(int id, int visible) {
|
|||
}
|
||||
|
||||
if (visible != 0) {
|
||||
reinterpret_cast<WindowOrdering&>(g_windowMgr).Promote(this->window_01EC);
|
||||
g_windowMgr.Promote(this->window_01EC);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
@ -71,7 +70,7 @@ bool UIWindowMgr::ShowWindowById(int id, int visible) {
|
|||
return true;
|
||||
}
|
||||
|
||||
reinterpret_cast<WindowOrdering&>(g_windowMgr).Promote(window);
|
||||
g_windowMgr.Promote(window);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
#include "UI/Window/UIWindowMgr.h"
|
||||
#include "UI/Window/WindowBorder.h"
|
||||
#include "UI/Window/WindowManagerWindows.h"
|
||||
#include "UI/Window/WindowOrdering.h"
|
||||
#include "Utility/Text/FormatString.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
|
@ -285,7 +284,7 @@ void UIItemReformWnd_DetailBtn::Slot48() {
|
|||
// FUNCTION: fn_04123
|
||||
void UIItemReformWnd::Slot19() {
|
||||
if (this->detailMsg) {
|
||||
reinterpret_cast<WindowOrdering&>(g_windowMgr).Promote(this->detailMsg);
|
||||
g_windowMgr.Promote(this->detailMsg);
|
||||
this->detailMsg->Move(g_mouse.x + 5, g_mouse.y + 5);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
#include "UI/Window/WindowBorder.h"
|
||||
#include "UI/Window/WindowManagerWindows.h"
|
||||
#include "UI/Window/UIWindowMgr.h"
|
||||
#include "UI/Window/WindowOrdering.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
|
|
@ -199,6 +198,6 @@ int UIRoundBoxTooltipWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a
|
|||
}
|
||||
|
||||
this->Invalidate();
|
||||
reinterpret_cast<WindowOrdering&>(g_windowMgr).Promote(this);
|
||||
g_windowMgr.Promote(this);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@
|
|||
#include "UI/Layout/SnapMgr.h"
|
||||
#include "UI/Lists/UITabControl.h"
|
||||
#include "UI/Window/WindowDialogs.h"
|
||||
#include "UI/Window/WindowOrdering.h"
|
||||
#include "Utility/Text/FormatString.h"
|
||||
#include "Utility/Text/GroupedInteger.h"
|
||||
|
||||
|
|
@ -269,7 +268,7 @@ int UIBasicInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argumen
|
|||
const int height = this->geometry.height;
|
||||
this->SetHeight(height == this->collapsedHeight ? this->expandedHeight : this->collapsedHeight);
|
||||
g_windowMgr.StoreSnapRectangle(this);
|
||||
reinterpret_cast<WindowOrdering&>(g_windowMgr).Promote(this);
|
||||
g_windowMgr.Promote(this);
|
||||
const int delta = this->geometry.height - height;
|
||||
if (delta != 0) {
|
||||
g_snapMgr.MoveEdge(this, 0, delta, 3);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
#include "UI/Window/WindowBorder.h"
|
||||
#include "UI/Window/WindowDialogs.h"
|
||||
#include "UI/Window/WindowManagerWindows.h"
|
||||
#include "UI/Window/WindowOrdering.h"
|
||||
#include "Utility/Text/FormatString.h"
|
||||
|
||||
#include <cstring>
|
||||
|
|
@ -328,7 +327,7 @@ void UIHotKeyWnd::Slot25(int x, int y) {
|
|||
(this->m_selectedRow % this->m_rowsPerPage - 1) * this->unknown_00D0 + this->unknown_00CC + this->unknown_00C4 + screenY + this->unknown_00BC
|
||||
);
|
||||
this->m_balloon->Show(1);
|
||||
reinterpret_cast<WindowOrdering&>(g_windowMgr).Promote(this->m_balloon);
|
||||
g_windowMgr.Promote(this->m_balloon);
|
||||
}
|
||||
|
||||
if (previous == this->m_selectedRow) {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
#include "UI/Text/UIStaticText.h"
|
||||
#include "UI/Window/UIControl.h"
|
||||
#include "UI/Window/UIWindowMgr.h"
|
||||
#include "UI/Window/WindowOrdering.h"
|
||||
#include "UI/Window/FuncDrawWNDChar.h"
|
||||
#include "Client/Registry.h"
|
||||
#include "Client/Mode/ModeMgr.h"
|
||||
|
|
@ -592,7 +591,7 @@ void UINewSelectCharWnd::Slot19() {
|
|||
|
||||
UIWindow* wnd = g_windowMgr.LookupWindow(93);
|
||||
if (wnd) {
|
||||
reinterpret_cast<WindowOrdering&>(g_windowMgr).Promote(wnd);
|
||||
g_windowMgr.Promote(wnd);
|
||||
}
|
||||
|
||||
if (this->m_pageSlot >= 0 && this->m_pageSlot < static_cast<int>(this->m_slotButtons2.size())) {
|
||||
|
|
|
|||
|
|
@ -460,6 +460,12 @@ public:
|
|||
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 sub_AAB070(int option);
|
||||
void sub_AAB090();
|
||||
void sub_AAB0B0();
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
#include "Contents/Configuration/ServiceOptions.h"
|
||||
#include "UI/Window/UIWindow.h"
|
||||
#include "UI/Window/UIWindowMgr.h"
|
||||
#include "UI/Window/WindowOrdering.h"
|
||||
|
||||
// INLINED
|
||||
inline bool UIWindowMgr::ShowShortcutWindow(int value) {
|
||||
|
|
@ -18,7 +17,7 @@ inline bool UIWindowMgr::ShowShortcutWindow(int value) {
|
|||
this->window_01E8->Show(value);
|
||||
|
||||
if (value != 0) {
|
||||
reinterpret_cast<WindowOrdering&>(g_windowMgr).Promote(this->window_01E8);
|
||||
g_windowMgr.Promote(this->window_01E8);
|
||||
}
|
||||
|
||||
if (g_serviceOptions.Get(0x10E)) {
|
||||
|
|
@ -31,7 +30,7 @@ inline bool UIWindowMgr::ShowShortcutWindow(int value) {
|
|||
companion->Show(value);
|
||||
|
||||
if (value != 0) {
|
||||
reinterpret_cast<WindowOrdering&>(g_windowMgr).Promote(companion);
|
||||
g_windowMgr.Promote(companion);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1081,7 +1081,7 @@ void UIWindowMgr::SendFlagEffect(int message) {
|
|||
// OFFSET: 0x00A8FCA0
|
||||
// FUNCTION: fn_17149
|
||||
bool UIWindowMgr::DropAt(int x, int y, ModeDragState* drag) {
|
||||
UIWindow* window = reinterpret_cast<WindowMouseHit*>(this)->HitTest(x, y);
|
||||
UIWindow* window = this->HitTestWindows(x, y);
|
||||
if (!window) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
#include "UI/Layout/WindowCoordinates.h"
|
||||
#include "UI/Window/WindowManagerWindows.h"
|
||||
#include "UI/Window/WindowMouseHit.h"
|
||||
#include "UI/Window/WindowOrdering.h"
|
||||
|
||||
// GLOBAL: gl_24656
|
||||
int g_alternateDoubleClickGate;
|
||||
|
|
@ -55,7 +54,7 @@ static void PromoteWindow(UIWindowMgr& mgr, UIWindow* window) {
|
|||
}
|
||||
|
||||
// INLINED
|
||||
static void CloseDropDown(UIWindowMgr& mgr) {
|
||||
static void HideDropDown(UIWindowMgr& mgr) {
|
||||
CUIDropDownBox* popup = static_cast<CUIDropDownBox*>(mgr.window_0A30);
|
||||
if (popup && popup->geometry.visible != 0) {
|
||||
popup->Detach();
|
||||
|
|
@ -65,7 +64,7 @@ static void CloseDropDown(UIWindowMgr& mgr) {
|
|||
|
||||
// OFFSET: 0x00A91B30
|
||||
// FUNCTION: fn_17168
|
||||
UIWindow* WindowMouseHit::FindUid(std::uint32_t uid) {
|
||||
UIWindow* UIWindowMgr::FindRenderedUid(std::uint32_t uid) {
|
||||
for (UIWindow* window : this->rendered) {
|
||||
if (UIWindow* found = window->FindUid(uid)) {
|
||||
return found;
|
||||
|
|
@ -77,17 +76,17 @@ UIWindow* WindowMouseHit::FindUid(std::uint32_t uid) {
|
|||
|
||||
// OFFSET: 0x00A91C70
|
||||
// FUNCTION: fn_17171
|
||||
UIWindow* WindowMouseHit::HitTest(int x, int y) {
|
||||
UIWindow* UIWindowMgr::HitTestWindows(int x, int y) {
|
||||
while (!this->rendered.empty()) {
|
||||
UIWindow* hit = this->rendered.back()->HitTest(x, y);
|
||||
y = static_cast<int>(static_cast<std::uint32_t>(reinterpret_cast<std::uintptr_t>(hit)));
|
||||
if (hit && hit->geometry.visible != 0) {
|
||||
this->previous = this->current;
|
||||
this->current = hit->Uid();
|
||||
if (this->previous != this->current) {
|
||||
this->previousHitUid = this->currentHitUid;
|
||||
this->currentHitUid = hit->Uid();
|
||||
if (this->previousHitUid != this->currentHitUid) {
|
||||
hit->Slot47();
|
||||
|
||||
if (UIWindow* old = this->FindUid(this->previous)) {
|
||||
if (UIWindow* old = this->FindRenderedUid(this->previousHitUid)) {
|
||||
old->Slot48();
|
||||
}
|
||||
}
|
||||
|
|
@ -103,10 +102,10 @@ UIWindow* WindowMouseHit::HitTest(int x, int y) {
|
|||
}
|
||||
}
|
||||
|
||||
this->previous = this->current;
|
||||
this->current = 0;
|
||||
if (this->previous != 0) {
|
||||
if (UIWindow* old = this->FindUid(this->previous)) {
|
||||
this->previousHitUid = this->currentHitUid;
|
||||
this->currentHitUid = 0;
|
||||
if (this->previousHitUid != 0) {
|
||||
if (UIWindow* old = this->FindRenderedUid(this->previousHitUid)) {
|
||||
old->Slot48();
|
||||
}
|
||||
}
|
||||
|
|
@ -114,169 +113,6 @@ UIWindow* WindowMouseHit::HitTest(int x, int y) {
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
// INLINED
|
||||
bool WindowMouseCapture::Dispatch() {
|
||||
if (!this->capture) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const int x = this->mouse.x;
|
||||
const int y = this->mouse.y;
|
||||
int left;
|
||||
int top;
|
||||
UIWindow* window = this->capture;
|
||||
WindowScreenPosition(window, left, top);
|
||||
const int localX = x - left;
|
||||
const int localY = y - top;
|
||||
|
||||
if (this->mouse.buttons[0] == 1) {
|
||||
UIWindow* root = window->Root();
|
||||
if (root && root->Slot02()) {
|
||||
this->ordering.Promote(root);
|
||||
}
|
||||
|
||||
this->capture->Slot25(localX, localY);
|
||||
}
|
||||
|
||||
if (this->mouse.buttons[0] == 4 && (this->doubleClickGate == 0 || this->alternateDoubleClickGate == 0)) {
|
||||
this->capture->Slot25(localX, localY);
|
||||
this->capture->Slot26(localX, localY);
|
||||
}
|
||||
|
||||
this->capture->ResetCursor(localX, localY);
|
||||
|
||||
if (this->previousX == x && this->previousY == y) {
|
||||
this->capture->Slot28(localX, localY);
|
||||
} else {
|
||||
this->capture->Slot27(localX, localY);
|
||||
}
|
||||
|
||||
if (this->mouse.wheel != 0) {
|
||||
this->capture->Slot35(this->mouse.wheel);
|
||||
}
|
||||
|
||||
if (this->mouse.buttons[0] == 3) {
|
||||
this->capture->Slot31(localX, localY);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// INLINED
|
||||
int WindowMouseUncaptured::Dispatch() {
|
||||
const int x = this->mouse.x;
|
||||
const int y = this->mouse.y;
|
||||
UIWindow* window = this->hit.HitTest(x, y);
|
||||
|
||||
if (!this->modal.empty() && this->modal.back() && window && window != this->modal.back() && !window->IsDescendantOf(this->modal.back())) {
|
||||
window = nullptr;
|
||||
}
|
||||
|
||||
if (this->mouse.buttons[0] == 1) {
|
||||
SetPressedWindowRoot(this->pressedRoot, window);
|
||||
}
|
||||
|
||||
int handled = 0;
|
||||
if (window) {
|
||||
handled = window->Slot08() ? 2 : 1;
|
||||
int left;
|
||||
int top;
|
||||
WindowScreenPosition(window, left, top);
|
||||
const int localX = x - left;
|
||||
const int localY = y - top;
|
||||
|
||||
if (this->mouse.buttons[0] == 4 && (this->doubleClickGate == 0 || this->alternateDoubleClickGate == 0)) {
|
||||
window->Slot26(localX, localY);
|
||||
}
|
||||
|
||||
if (this->mouse.buttons[1] == 4) {
|
||||
window->Slot34(localX, localY);
|
||||
}
|
||||
|
||||
if (this->mouse.buttons[0] == 1) {
|
||||
UIWindow* root = window->Root();
|
||||
if (root && root->Slot02()) {
|
||||
this->ordering.Promote(root);
|
||||
}
|
||||
|
||||
CUIDropDownBox* popup = this->dropdown.popup;
|
||||
if (popup && window != popup && root != popup && !popup->HasOwnerChild(window)) {
|
||||
this->dropdown.Close();
|
||||
}
|
||||
|
||||
window->Slot25(localX, localY);
|
||||
}
|
||||
|
||||
if (this->mouse.buttons[1] == 1) {
|
||||
UIWindow* root = window->Root();
|
||||
if (root && root->Slot02()) {
|
||||
this->ordering.Promote(root);
|
||||
}
|
||||
|
||||
window->Slot32(localX, localY);
|
||||
}
|
||||
|
||||
window->ResetCursor(localX, localY);
|
||||
if (this->previousX == x && this->previousY == y) {
|
||||
window->Slot28(localX, localY);
|
||||
} else {
|
||||
window->Slot27(localX, localY);
|
||||
}
|
||||
|
||||
if (this->mouse.wheel != 0) {
|
||||
window->Slot35(this->mouse.wheel);
|
||||
}
|
||||
|
||||
if (this->mouse.buttons[1] == 3) {
|
||||
window->Slot33(localX, localY);
|
||||
}
|
||||
|
||||
if (this->mouse.buttons[0] == 3) {
|
||||
window->Slot31(localX, localY);
|
||||
}
|
||||
}
|
||||
|
||||
if (this->mouse.buttons[0] == 1) {
|
||||
if (this->dismiss26 && (!window || (window != this->dismiss26 && !window->IsDescendantOf(this->dismiss26)))) {
|
||||
this->windows.CloseWindow(26);
|
||||
}
|
||||
|
||||
if (this->dismiss260) {
|
||||
if (!window || (window != this->dismiss260 && !window->IsDescendantOf(this->dismiss260))) {
|
||||
this->windows.CloseWindow(260);
|
||||
if (!window) {
|
||||
this->dropdown.Close();
|
||||
}
|
||||
}
|
||||
} else if (!window) {
|
||||
this->dropdown.Close();
|
||||
}
|
||||
}
|
||||
|
||||
for (unsigned index = 0; index < this->refresh.size(); ++index) {
|
||||
UIWindow* refreshed = *this->refresh[index];
|
||||
if (refreshed && (index != 5 || this->refreshGate == 0)) {
|
||||
refreshed->Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
if (window) {
|
||||
if (this->hover && this->hover != window) {
|
||||
int left;
|
||||
int top;
|
||||
WindowScreenPosition(this->hover, left, top);
|
||||
const int localX = x - left;
|
||||
const int localY = y - top;
|
||||
this->hover->Slot27(localX, localY);
|
||||
this->hover->ResetCursor(localX, localY);
|
||||
}
|
||||
|
||||
this->hover = window;
|
||||
}
|
||||
|
||||
return handled;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00AA4730
|
||||
// FUNCTION: fn_17222
|
||||
int UIWindowMgr::ProcessMouse() {
|
||||
|
|
@ -381,7 +217,7 @@ int UIWindowMgr::ProcessMouse() {
|
|||
this->inputWindow->Slot31(localX, localY);
|
||||
}
|
||||
} else {
|
||||
UIWindow* window = reinterpret_cast<WindowMouseHit*>(this)->HitTest(x, y);
|
||||
UIWindow* window = this->HitTestWindows(x, y);
|
||||
|
||||
if (!this->modalWindows.empty() && this->modalWindows.back() && window) {
|
||||
UIWindow* modalWindow = this->modalWindows.back();
|
||||
|
|
@ -418,7 +254,7 @@ int UIWindowMgr::ProcessMouse() {
|
|||
|
||||
CUIDropDownBox* popup = static_cast<CUIDropDownBox*>(this->window_0A30);
|
||||
if (popup && window != popup && root != popup && !popup->HasOwnerChild(window)) {
|
||||
CloseDropDown(*this);
|
||||
HideDropDown(*this);
|
||||
}
|
||||
|
||||
window->Slot25(localX, localY);
|
||||
|
|
@ -461,12 +297,12 @@ int UIWindowMgr::ProcessMouse() {
|
|||
if (this->unknown_021C) {
|
||||
if (!window) {
|
||||
this->CloseWindow(260);
|
||||
CloseDropDown(*this);
|
||||
HideDropDown(*this);
|
||||
} else if (window != this->unknown_021C && !window->IsDescendantOf(this->unknown_021C)) {
|
||||
this->CloseWindow(260);
|
||||
}
|
||||
} else if (!window) {
|
||||
CloseDropDown(*this);
|
||||
HideDropDown(*this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,54 +8,7 @@
|
|||
#include <map>
|
||||
|
||||
class UIWindow;
|
||||
class CMouse;
|
||||
struct WindowOrdering;
|
||||
#include "UI/Window/WindowManagerWindows.h"
|
||||
struct WindowDropDown;
|
||||
|
||||
struct WindowMouseHit {
|
||||
std::list<UIWindow*>& rendered;
|
||||
std::map<int, UIWindow*>& overlays;
|
||||
std::uint32_t& previous;
|
||||
std::uint32_t& current;
|
||||
|
||||
UIWindow* FindUid(std::uint32_t uid);
|
||||
UIWindow* HitTest(int x, int y);
|
||||
};
|
||||
|
||||
struct WindowMouseCapture {
|
||||
UIWindow*& capture;
|
||||
WindowOrdering& ordering;
|
||||
const CMouse& mouse;
|
||||
const int& previousX;
|
||||
const int& previousY;
|
||||
const int& doubleClickGate;
|
||||
const int& alternateDoubleClickGate;
|
||||
|
||||
bool Dispatch();
|
||||
};
|
||||
|
||||
struct WindowMouseUncaptured {
|
||||
WindowMouseHit& hit;
|
||||
WindowOrdering& ordering;
|
||||
WindowDropDown& dropdown;
|
||||
WindowManagerWindows& windows;
|
||||
const std::deque<UIWindow*>& modal;
|
||||
const CMouse& mouse;
|
||||
const int& previousX;
|
||||
const int& previousY;
|
||||
const int& doubleClickGate;
|
||||
const int& alternateDoubleClickGate;
|
||||
UIWindow*& pressedRoot;
|
||||
UIWindow* const& dismiss26;
|
||||
UIWindow* const& dismiss260;
|
||||
UIWindow*& hover;
|
||||
|
||||
std::array<UIWindow**, 7> refresh;
|
||||
const int& refreshGate;
|
||||
|
||||
int Dispatch();
|
||||
};
|
||||
|
||||
extern int g_alternateDoubleClickGate;
|
||||
extern int g_mouseRefreshGate;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
#include "UI/Window/UIWindowMgr.h"
|
||||
#include "UI/Window/UIWindow.h"
|
||||
#include "UI/Window/WindowManagerWindows.h"
|
||||
#include "UI/Window/WindowOrdering.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
|
|
@ -101,12 +100,12 @@ char UIWindowMgr::UpdateSnapRectangles() {
|
|||
|
||||
// OFFSET: 0x00A976C0
|
||||
// FUNCTION: fn_17206
|
||||
void WindowOrdering::Promote(UIWindow* window) {
|
||||
if (!window || (this->modal != 0 && this->modalWindow != window)) {
|
||||
void UIWindowMgr::Promote(UIWindow* window) {
|
||||
if (!window || (this->modal != nullptr && this->window_4F174 != window)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this->windows.LookupWindow(278) || this->windows.LookupWindow(4) || this->windows.LookupWindow(199) || this->windows.LookupWindow(200)) {
|
||||
if (this->LookupWindow(278) || this->LookupWindow(4) || this->LookupWindow(199) || this->LookupWindow(200)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -138,12 +137,12 @@ void WindowOrdering::Promote(UIWindow* window) {
|
|||
|
||||
// OFFSET: 0x00A969D0
|
||||
// FUNCTION: fn_17190
|
||||
void WindowOrdering::InvalidateFrames(int& latch) {
|
||||
if (latch != 0) {
|
||||
void UIWindowMgr::InvalidateFrames() {
|
||||
if (this->unknown_04FC != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
latch = 1;
|
||||
this->unknown_04FC = 1;
|
||||
|
||||
for (UIWindow* window : this->rendered) {
|
||||
if (window->Slot03()) {
|
||||
|
|
|
|||
|
|
@ -1,20 +0,0 @@
|
|||
#ifndef RAGNAROK_SOURCE_UI_WINDOW_WINDOWORDERING_H
|
||||
#define RAGNAROK_SOURCE_UI_WINDOW_WINDOWORDERING_H
|
||||
|
||||
#include <list>
|
||||
|
||||
class UIWindow;
|
||||
#include "UI/Window/WindowManagerWindows.h"
|
||||
|
||||
struct WindowOrdering {
|
||||
std::list<UIWindow*>& rendered;
|
||||
WindowManagerWindows& windows;
|
||||
const int& modal;
|
||||
UIWindow* const& modalWindow;
|
||||
|
||||
void Promote(UIWindow* window);
|
||||
|
||||
void InvalidateFrames(int& latch);
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue