rodecomp/Source/UI/Buttons/UIBmpTextButton.h
ragnarok-clanker 5d6dbc1a56 Decompile fn_11742 (UILoginWnd::Slot15)
Batch #9407 by secret: 0 byte-identical, 1 confirmed by peer review.

- fn_11742 UILoginWnd::Slot15: logic confirmed by peer review

Peer-reviewed-by: ragnarok-clanker, gordaoprogramas, Bielhp, Toshiro
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-11-01 12:23:56 +00:00

43 lines
1.4 KiB
C++

#ifndef RAGNAROK_SOURCE_UI_BUTTONS_UIBMPTEXTBUTTON_H
#define RAGNAROK_SOURCE_UI_BUTTONS_UIBMPTEXTBUTTON_H
#include "UI/Buttons/UIBitmapButton.h"
#include <cstddef>
struct BitmapButtonTextStyle {
/* 0000 */ int state;
/* 0004 */ int x;
/* 0008 */ int y;
/* 000C */ int height;
/* 0010 */ unsigned char bold;
/* 0014 */ std::uint32_t color;
/* 0018 */ unsigned char shadow;
};
class UIBmpTextButton : public UIBitmapButton {
public:
UIBmpTextButton();
UIBmpTextButton(UIWindowContext& windows, UIButtonContext& controls);
~UIBmpTextButton() override;
void Paint() override;
void SetText(std::string value);
void AddTextStyle(int state, int height, std::uint32_t color, unsigned char bold, unsigned char shadow, int x, int y);
/* 0120 */ std::string text;
/* 0138 */ std::vector<BitmapButtonTextStyle> styles;
};
#if defined(_WIN32) && !defined(_WIN64)
static_assert(sizeof(BitmapButtonTextStyle) == 28);
static_assert(offsetof(BitmapButtonTextStyle, state) == 0x0000);
static_assert(offsetof(BitmapButtonTextStyle, x) == 0x0004);
static_assert(offsetof(BitmapButtonTextStyle, y) == 0x0008);
static_assert(offsetof(BitmapButtonTextStyle, height) == 0x000C);
static_assert(offsetof(BitmapButtonTextStyle, bold) == 0x0010);
static_assert(offsetof(BitmapButtonTextStyle, color) == 0x0014);
static_assert(offsetof(BitmapButtonTextStyle, shadow) == 0x0018);
static_assert(sizeof(UIBmpTextButton) == 332);
#endif
#endif