rodecomp/Source/UI/Text/UITransBalloonText.h
ragnarok-clanker cca267e5e8 Decompile 8 functions in Source/UI/Buttons/UIBmpTextButton2.h, Source/UI/Buttons/UITextureButton.h, ...
Batch #3721 by youko: 5 byte-identical, 3 confirmed by peer review.

- fn_10813 UINoneVisibleButton::Paint: byte-identical
- fn_10822 UITextureButton::Paint: byte-identical
- fn_10827 UIEditCtrlVarId::Slot24: byte-identical
- fn_10833 UISlotBitmap::Slot26: byte-identical
- fn_10844 UIRadioBtn::Slot25: logic confirmed by peer review
- fn_10846 UISlotBitmap::Slot25: logic confirmed by peer review
- fn_10862 UIResizer::Slot28: byte-identical
- fn_10887 UISlotBitmap::Slot32: logic confirmed by peer review

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/Buttons/UIBmpTextButton2.cpp, Source/UI/Buttons/UIColorButton.cpp, Source/UI/Buttons/UINoneVisibleButton.cpp, Source/UI/Buttons/UIRadioBtn.cpp, Source/UI/Buttons/UITextureButton.cpp, Source/UI/Chat/UIChatRoomTitle.cpp, Source/UI/Shop/UIMerchantShopTitle.cpp, Source/UI/UISlotBitmap.cpp, Source/UI/Window/UIBitmapTab.cpp, Source/UI/Window/UIEmblemWnd.cpp, Source/UI/Window/UIResizer.cpp, Source/UI/Window/UITab.cpp, Source/UI/Window/UIWordDisplayWnd.cpp
2026-10-29 23:07:25 +00:00

62 lines
1.9 KiB
C++

#ifndef RAGNAROK_SOURCE_UI_TEXT_UITRANSBALLOONTEXT_H
#define RAGNAROK_SOURCE_UI_TEXT_UITRANSBALLOONTEXT_H
#include "UI/Text/UIBalloonText.h"
#include <cstddef>
struct BalloonRectangle {
/* 00A0 */ int x;
/* 00A4 */ int y;
/* 00A8 */ int width;
/* 00AC */ int height;
/* 00B0 */ std::uint32_t unknown_00B0;
/* 00B4 */ std::uint32_t color;
/* 00B8 */ std::uint32_t unknown_00B8;
};
class UITransBalloonText : public UIBalloonText {
public:
UITransBalloonText(UIWindowContext& windows, BalloonTextContext& text);
~UITransBalloonText() override;
void Resize(int width, int height) override;
void Move(int x, int y) override;
bool Slot07(void* output) override;
void Slot15(int width, int height) override;
void Paint() override;
// INLINED
void SetRichText(unsigned char value) {
this->m_richText = value;
}
void SetColors(std::uint32_t text, std::uint32_t outline);
void SetBackground(std::uint32_t color);
private:
/* 00A0 */ BalloonRectangle m_rectangle;
/* 00BC */ std::vector<std::uint32_t> m_lineColors;
/* 00C8 */ std::uint32_t m_borderColor;
};
// VTABLE: vt_00945
class UIColorTransBalloonText : public UITransBalloonText {
public:
// INLINED
UIColorTransBalloonText(UIWindowContext& windows, BalloonTextContext& text) : UITransBalloonText(windows, text) {}
void Paint() override;
};
#if defined(_WIN32) && !defined(_WIN64)
static_assert(sizeof(BalloonRectangle) == 0x1C);
static_assert(offsetof(BalloonRectangle, x) + 0xA0 == 0xA0);
static_assert(offsetof(BalloonRectangle, y) + 0xA0 == 0xA4);
static_assert(offsetof(BalloonRectangle, width) + 0xA0 == 0xA8);
static_assert(offsetof(BalloonRectangle, height) + 0xA0 == 0xAC);
static_assert(offsetof(BalloonRectangle, unknown_00B0) + 0xA0 == 0xB0);
static_assert(offsetof(BalloonRectangle, color) + 0xA0 == 0xB4);
static_assert(offsetof(BalloonRectangle, unknown_00B8) + 0xA0 == 0xB8);
static_assert(sizeof(UITransBalloonText) == 212);
#endif
#endif