Decompile fn_12754 (UIRoMapWnd::SendMsg)
Batch #9239 by secret: 0 byte-identical, 1 confirmed by peer review. - fn_12754 UIRoMapWnd::SendMsg: logic confirmed by peer review Peer-reviewed-by: superintelligence, KWDev, SapitoSucio Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
parent
f547282ea6
commit
effac2c080
2 changed files with 83 additions and 2 deletions
|
|
@ -711,3 +711,77 @@ void CFlyingShipRouteInfo::BuildRoute(const std::vector<std::string>& mapNames)
|
|||
}
|
||||
reinterpret_cast<unsigned char*>(&this->unknown_0034)[1] = 1;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00938FF0
|
||||
// FUNCTION: fn_12754
|
||||
int UIRoMapWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) {
|
||||
switch (message) {
|
||||
case 0:
|
||||
if (sender == this->m_searchEdit) {
|
||||
if (this->m_searchEdit->Length() > 0) {
|
||||
this->SendMsg(this->m_searchEdit, 6, 321, 0, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
switch (argument1) {
|
||||
case 192:
|
||||
this->m_showLabels = !this->m_showLabels;
|
||||
this->m_labelCheck->geometry.unknown_0030 = this->m_showLabels;
|
||||
this->m_labelCheck->Invalidate();
|
||||
this->Invalidate();
|
||||
return 0;
|
||||
case 200:
|
||||
g_windowMgr.EnsureWindow(203);
|
||||
if (g_navigationWindow) {
|
||||
g_navigationWindow->SendMsg(nullptr, 6, 200, 0, 0, 0);
|
||||
}
|
||||
this->UpdateNavigationButtons();
|
||||
return 0;
|
||||
case 201:
|
||||
g_windowMgr.CloseWindow(140);
|
||||
return 0;
|
||||
case 321:
|
||||
if (this->m_searchEdit->Length()) {
|
||||
std::string name(this->m_searchEdit->Text());
|
||||
if (g_navigationManager.sub_B995D0(name, 0, true) == true) {
|
||||
reinterpret_cast<UINavigationWnd*>(this)->RefreshWorldMapLevels();
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
case 39:
|
||||
if (this->m_worldCombo == sender) {
|
||||
g_worldViewMgr.currentWorld = argument1;
|
||||
this->Invalidate();
|
||||
return 0;
|
||||
}
|
||||
if (argument1 >= 0 && static_cast<unsigned int>(argument1) < this->unknown_01FC.size()) {
|
||||
{
|
||||
std::string name(g_worldViewMgr.CurrentWorld()->maps[this->unknown_0208]->fields[argument1]->name);
|
||||
if (name.size() > 4) {
|
||||
name.resize(name.size() - 4);
|
||||
}
|
||||
g_navigationMinimized = false;
|
||||
g_navigationManager.sub_B995D0(name, 0, false);
|
||||
if (g_windowMgr.LookupWindow(203)) {
|
||||
static_cast<UINavigationV4Wnd*>(g_navigationWindow)->SelectRoute(0);
|
||||
static_cast<UINavigationV4Wnd*>(g_navigationWindow)->SelectRouteNode(0);
|
||||
}
|
||||
this->UpdateNavigationButtons();
|
||||
}
|
||||
this->Invalidate();
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
case 60:
|
||||
this->ClearRecords();
|
||||
this->RefreshPartyRecords();
|
||||
this->Invalidate();
|
||||
return 0;
|
||||
}
|
||||
|
||||
return UIFrameWnd::SendMsg(sender, message, argument1, argument2, argument3, argument4);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
#include "Contents/FlyingShipRouteInfo.h"
|
||||
#include "Contents/WorldView/WorldViewData.h"
|
||||
#include "UI/Window/UIFrameWnd.h"
|
||||
#include "UI/Edit/UIEditCtrl.h"
|
||||
#include "UI/Navigation/UINavigationV4Wnd.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <list>
|
||||
|
|
@ -57,6 +59,7 @@ public:
|
|||
void Slot27(int x, int y) override;
|
||||
void Slot31(int x, int y) override;
|
||||
void Slot33(int x, int y) override;
|
||||
int SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) override;
|
||||
void ClearRecords();
|
||||
void ResetKafraBounds();
|
||||
void UpdateNavigationButtons();
|
||||
|
|
@ -98,10 +101,14 @@ private:
|
|||
/* 0198 */ CFlyingShipRouteInfo m_flyingShipRoute2;
|
||||
/* 01E8 */ int m_mouseX;
|
||||
/* 01EC */ int m_mouseY;
|
||||
/* 01F0 */ unsigned char unknown_01F0[0xC];
|
||||
/* 01F0 */ UIWindow* unknown_01F0;
|
||||
/* 01F4 */ UIWindow* m_worldCombo;
|
||||
/* 01F8 */ UIWindow* m_labelCheck;
|
||||
/* 01FC */ std::vector<std::string> unknown_01FC;
|
||||
/* 0208 */ int unknown_0208;
|
||||
/* 020C */ unsigned char unknown_020C[0xC];
|
||||
/* 020C */ UIWindow* unknown_020C;
|
||||
/* 0210 */ UIWindow* unknown_0210;
|
||||
/* 0214 */ UIEditCtrl* m_searchEdit;
|
||||
/* 0218 */ int m_kafraLeft;
|
||||
/* 021C */ int m_kafraTop;
|
||||
/* 0220 */ int m_kafraRight;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue