Decompile fn_14631 (CUIButton::Slot28)

Batch #4210 by superintelligence: 0 byte-identical, 1 confirmed by peer review.

- fn_14631 CUIButton::Slot28: logic confirmed by peer review

Peer-reviewed-by: eAthena, bigodeira, Lumen, Snow, zindokar
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
ragnarok-clanker 2026-10-30 02:22:40 +00:00
commit f562ce4bee
2 changed files with 30 additions and 2 deletions

View file

@ -4,6 +4,8 @@
#include "UI/Lists/UIThumb.h"
#include "UI/Edit/UIEditCtrl.h"
#include "Client/Mode/ModeCursor.h"
#include "Client/Mode/ModeMgr.h"
#include "Client/Mode/ModeTooltip.h"
#include "Resource/Bitmap/BitmapResource.h"
#include "Resource/ResourceMgr.h"
#include "Resource/TextureNames.h"
@ -574,6 +576,28 @@ void CUIButton::Slot47() {
this->SetState(2);
}
// OFFSET: 0x009EEA00
// FUNCTION: fn_14631
void CUIButton::Slot28(int, int) {
if (this->unknown_00EC) {
this->unknown_00EC->Slot02();
}
if (this->tooltip.empty()) {
return;
}
int screenX = 0;
int screenY = -20;
for (const UIWindow* node = this; node; node = node->parent) {
screenX = (screenX + node->geometry.x);
screenY = (screenY + node->geometry.y);
}
reinterpret_cast<ModeTooltip*>(g_modeMgr.gameMode)->Show(this->tooltip.c_str(), screenX, screenY, 0xFFFFFFFFu, 0, 1);
}
// OFFSET: 0x009EEA70
// FUNCTION: fn_14632
void CUIButton::Slot48() {

View file

@ -97,6 +97,7 @@ public:
class CUIButton : public CUIControl {
public:
void Slot25(int x, int y) override;
void Slot28(int x, int y) override;
void Slot26(int x, int y) override;
void ResetCursor(int x, int y) override;
void Slot31(int argument1, int argument2) override;
@ -107,9 +108,12 @@ public:
/* 0080 */ int state;
/* 0084 */ unsigned char disabled;
/* 0085 */ unsigned char unknown_0085[0x3F];
/* 0085 */ unsigned char unknown_0085[0x03];
/* 0088 */ std::string tooltip;
/* 00A0 */ unsigned char unknown_00A0[0x24];
/* 00C4 */ UIWindow* unknown_00C4;
/* 00C8 */ unsigned char unknown_00C8[0x28];
/* 00C8 */ unsigned char unknown_00C8[0x24];
/* 00EC */ UIWindow* unknown_00EC;
};
class CUITextButton : public CUIButton {