rodecomp/Source/UI/Buttons/UIButton.h
ragnarok-clanker 68e1d03878 Decompile 22 functions in Source/UI/Text/UIAchWnd.cpp, Source/UI/Text/UIAchWnd.h, ...
Batch #3978 by eAthena: 0 byte-identical, 22 confirmed by peer review.

- fn_09205 UIAchListWnd::sub_7B37F0: logic confirmed by peer review
- fn_09206 UIAchTV::Clear: logic confirmed by peer review
- fn_09207 UIAchTab::ClearGroups: logic confirmed by peer review
- fn_09208 UIAchListWnd::Create: logic confirmed by peer review
- fn_09210 UIAchTab::Label: logic confirmed by peer review
- fn_09211 UIAchTab::sub_7B4370: logic confirmed by peer review
- fn_09212 UIAchievementWnd::CreateTab: logic confirmed by peer review
- fn_09220 UIAchTV::Paint: logic confirmed by peer review
- fn_09224 UIAchievementWnd::Paint: logic confirmed by peer review
- fn_09225 UICustomGageBar::Paint: logic confirmed by peer review
- fn_09239 UIAchListWnd::Slot35: logic confirmed by peer review
- fn_09240 UIAchTab::Slot35: logic confirmed by peer review
- fn_09241 UIAchListWnd::UpdateScroll: logic confirmed by peer review
- fn_09242 UIAchTab::sub_7B7F10: logic confirmed by peer review
- fn_09243 UIAchTab::Refresh: logic confirmed by peer review
- fn_09246 UIAchTab::SendMsg: logic confirmed by peer review
- fn_09247 UIAchUpperWnd::SendMsg: logic confirmed by peer review
- fn_09251 UIToolTipBitmapWnd::Set: logic confirmed by peer review
- fn_09252 UIAchSummaryWnd::Show: logic confirmed by peer review
- fn_09254 UIAchTab::SetLabel: logic confirmed by peer review
- fn_11583 UIScrollBar::SetPosition: logic confirmed by peer review
- fn_11584 UIScrollBar::SetRange: logic confirmed by peer review

Peer-reviewed-by: ragnarok-clanker, youko
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
Adds to the build: Source/UI/Text/UIAchWnd.cpp
2026-10-30 00:22:53 +00:00

78 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;
};
struct UIButtonContext {
ResourceMgr& resources;
LuaScript& behavior;
FontCache& fonts;
const TextLocale& locale;
ButtonServices& services;
const int* policy;
const bool& restricted;
const int* activeModeType;
UIWindow* const& hoverParent;
};
class UIButton : public UIWindow {
friend class UIAdvenPartyBoardWnd;
friend class UIAchListWnd;
public:
UIButton(UIWindowContext& windowContext, UIButtonContext& buttonContext);
~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);
void SetState(int state);
// INLINED
void SetDisabled(unsigned char value) {
this->m_disabled = value;
}
// INLINED
unsigned char Disabled() const {
return this->m_disabled;
}
std::string label;
protected:
/* 0094 */ std::string m_tooltip;
/* 00AC */ unsigned char m_disabled;
/* 00AD */ unsigned char m_drawLabel;
/* 00B0 */ int m_argument;
UIButtonContext* m_buttonContext;
};
#if defined(_WIN32) && !defined(_WIN64)
static_assert(sizeof(UIButton) == 188);
#endif
#endif