rodecomp/Source/UI/Text/UITextViewerControl.h
ragnarok-clanker 176a21827f Decompile 16 functions in Source/UI/Window/UIControl.cpp, Source/UI/Text/UITextViewerControl.h
Batch #5331 by eAthena: 14 byte-identical, 2 confirmed by peer review.

- fn_13921 UnusedTrue9BD4F0: byte-identical
- fn_13922 UnusedTrue9BD500: byte-identical
- fn_13923 UnusedTrue9BD510: byte-identical
- fn_13924 UnusedTrue9BD520: byte-identical
- fn_13925 UnusedTrue9BD530: byte-identical
- fn_13926 UnusedTrue9BD540: byte-identical
- fn_13927 UnusedTrue9BD550: byte-identical
- fn_13928 UnusedTrue9BD560: byte-identical
- fn_13929 UnusedTrue9BD570: byte-identical
- fn_13930 UnusedTrue9BD580: byte-identical
- fn_13931 UnusedTrue9BD590: byte-identical
- fn_13932 UnusedTrue9BD5A0: byte-identical
- fn_13933 UnusedTrue9BD5B0: byte-identical
- fn_13934 UnusedTrue9BD5C0: byte-identical
- fn_13944 CUIImageButton::CUIImageButton: logic confirmed by peer review (annotation added to existing code)
- fn_13947 CUITextViewer::CUITextViewer: logic confirmed by peer review

Peer-reviewed-by: ragnarok-clanker, alisonrag, tayoba
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-10-30 10:33:54 +00:00

63 lines
2 KiB
C++

#ifndef RAGNAROK_SOURCE_UI_TEXT_UITEXTVIEWERCONTROL_H
#define RAGNAROK_SOURCE_UI_TEXT_UITEXTVIEWERCONTROL_H
#include "UI/Window/UIControl.h"
#include <cstdint>
#include <map>
#include <string>
#include <utility>
#include <vector>
class CUIPadding;
class CUIVScrollBar;
class CUITextViewer : public CUIControl {
public:
explicit CUITextViewer(UIWindowContext& context);
void Slot19() override;
void Paint() override;
void Slot35(int value) override;
void SetTextOffset(int x, int y);
void SetBackgroundColor(std::uint32_t value);
void SetBold(bool value);
void SetTextColor(std::uint32_t value);
void SetFontHeight(int value);
void SetFont(const std::string& name);
void SetLineSpacing(int value);
void SetOutline(bool enabled, std::uint32_t value);
void SetPadding(int left, int top, int right, int bottom);
void SetScrollStep(int value);
void SetScrollBarSize(int width, int height);
void SetScrollBarButtonImages(const std::string& up, const std::string& down);
void SetScrollBarThumbImages(const std::string& top, const std::string& middle, const std::string& bottom);
void SetScrollBarThumbImage(const std::string& name);
void SetScrollBarBackground(const std::string& name);
void SetText(const std::string& text);
void Clear();
/* 0080 */ int textX;
/* 0084 */ int textY;
/* 0088 */ int font;
/* 008C */ int fontHeight;
/* 0090 */ bool bold;
/* 0094 */ std::uint32_t textColor;
/* 0098 */ bool unknown_0098;
/* 009C */ std::uint32_t unknown_009C;
/* 00A0 */ bool outline;
/* 00A4 */ std::uint32_t outlineColor;
/* 00A8 */ int lineSpacing;
/* 00AC */ std::uint32_t backgroundColor;
/* 00B0 */ int paddingLeft;
/* 00B4 */ int paddingTop;
/* 00B8 */ int paddingRight;
/* 00BC */ int paddingBottom;
/* 00C0 */ CUIVScrollBar* scrollBar;
/* 00C4 */ CUIPadding* padding;
/* 00C8 */ std::vector<std::string> lines;
/* 00D4 */ int contentHeight;
/* 00D8 */ std::map<UIWindow*, std::pair<int, int>> childPositions;
};
#endif