rodecomp/Source/UI/Buttons/UIButton.h
ragnarok-clanker c6c84cb2fc Decompile 2 functions in Source/UI/UIReputeWnd.cpp, Source/UI/Buttons/UIButton.h
Batch #14210 by eAthena: 0 byte-identical, 2 confirmed by peer review.

- fn_04313 UIReputeWnd::Slot15: logic confirmed by peer review
- fn_04315 UIReputeWnd::SendMsg: logic confirmed by peer review

Peer-reviewed-by: Yommy, secret, aDw
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-11-07 06:17:48 +00:00

77 lines
1.9 KiB
C++

#ifndef RAGNAROK_SOURCE_UI_BUTTONS_UIBUTTON_H
#define RAGNAROK_SOURCE_UI_BUTTONS_UIBUTTON_H
#include "UI/Window/UIWindow.h"
#include <string>
class ResourceMgr;
class LuaScript;
class FontCache;
struct TextLocale;
class ButtonServices {
public:
virtual void Tooltip(const char* text, int x, int y, int color, bool option, bool convert) = 0;
virtual const char* MessageText(int id) = 0;
virtual int Confirm(const char* text, int type, int option1, int option2, const char* caption, int width, int height) = 0;
virtual void Submit(UIWindow* window) = 0;
protected:
~ButtonServices() = default;
};
class UIButton : public UIWindow {
friend class UIAdvenPartyBoardWnd;
friend class UIAchListWnd;
friend class UIStylingshopTabParentWnd;
friend class UIDisplayCharacter;
friend class UIPrivateAirplaneWnd; friend class UINewMakeCharWnd;
friend class UIRodexInboxWnd; friend class UIMiniMapWnd;
public:
UIButton();
~UIButton() override;
void Paint() override;
void Slot25(int x, int y) override;
void Slot26(int x, int y) override;
void Slot27(int x, int y) override;
void Slot28(int x, int y) override;
void Slot29(int x, int y) override;
void ResetCursor(int x, int y) override;
void Slot31(int x, int y) override;
virtual void Enable(unsigned char value);
void SetTooltip(const char* text);
// INLINED
void SetLabel(std::string text) {
this->label = text;
}
void SetState(int state);
// INLINED
void SetDisabled(unsigned char value) {
this->m_disabled = value;
}
// INLINED
unsigned char Disabled() const {
return this->m_disabled;
}
// INLINED
void SetDrawLabel(unsigned char value) {
this->m_drawLabel = value;
}
std::string label;
protected:
/* 0094 */ std::string m_tooltip;
/* 00AC */ unsigned char m_disabled;
/* 00AD */ unsigned char m_drawLabel;
/* 00B0 */ int m_argument;
};
#if defined(_WIN32) && !defined(_WIN64)
static_assert(sizeof(UIButton) == 0xB4);
#endif
#endif