Batch #5842 by Yommy: 0 byte-identical, 17 confirmed by peer review. - fn_14671 CUIStaticText::UpdateText: logic confirmed by peer review - fn_14672 CUIStaticText::SetAlign: logic confirmed by peer review - fn_14673 CUIStaticText::SetFitText: logic confirmed by peer review - fn_14674 CUIStaticText::SetBold: logic confirmed by peer review - fn_14676 CUIStaticText::SetFontHeight: logic confirmed by peer review - fn_14677 CUIStaticText::SetFont: logic confirmed by peer review - fn_14680 CUIStaticText::SetText: logic confirmed by peer review - fn_14681 CUIStaticText::SetTooltip: logic confirmed by peer review - fn_14702 CUITitleBar::SetTitle: logic confirmed by peer review - fn_14566 CUITextButton::UpdateText: logic confirmed by peer review - fn_14567 CUITextButton::SetAlign: logic confirmed by peer review - fn_14568 CUITextButton::SetOrientation: logic confirmed by peer review - fn_14569 CUITextButton::SetFitText: logic confirmed by peer review - fn_14570 CUITextButton::SetBold: logic confirmed by peer review - fn_14572 CUITextButton::SetFontHeight: logic confirmed by peer review - fn_14573 CUITextButton::SetFont: logic confirmed by peer review - fn_14576 CUITextButton::SetText: logic confirmed by peer review Peer-reviewed-by: willerthal, Snow, Millenium, Qwenkler3.8 Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
59 lines
1.8 KiB
C++
59 lines
1.8 KiB
C++
#ifndef RAGNAROK_SOURCE_UI_TEXT_UISTATICTEXTCONTROL_H
|
|
#define RAGNAROK_SOURCE_UI_TEXT_UISTATICTEXTCONTROL_H
|
|
|
|
#include "UI/Window/UIControl.h"
|
|
|
|
#include <cstddef>
|
|
#include <cstdint>
|
|
#include <string>
|
|
|
|
class CUIVScrollBar;
|
|
|
|
class CUIStaticText : public CUIControl {
|
|
public:
|
|
void UpdateText();
|
|
void SetAlign(int horizontal, int vertical);
|
|
void SetFitText(bool enabled);
|
|
void SetBold(unsigned char enabled);
|
|
void SetColor(std::uint32_t color);
|
|
void SetFontHeight(int height);
|
|
void SetFont(const std::string& name);
|
|
void SetOutline(bool enabled, std::uint32_t color);
|
|
void SetShadow(bool enabled, std::uint32_t color);
|
|
__declspec(noinline) void SetText(const char* value, std::size_t length);
|
|
void SetTooltip(const char* value, std::size_t length);
|
|
|
|
std::string& Tooltip() {
|
|
return *reinterpret_cast<std::string*>(this->unknown_00B0);
|
|
}
|
|
|
|
/* 0084 */ unsigned char unknown_0084[0x14];
|
|
/* 0098 */ std::string unknown_0098;
|
|
/* 00B0 */ unsigned char unknown_00B0[0x10];
|
|
/* 00C0 */ CUIVScrollBar* scrollBar;
|
|
/* 00C4 */ unsigned char unknown_00C4[0x04];
|
|
/* 00C8 */ bool fitText;
|
|
/* 00CC */ int horizontalAlign;
|
|
/* 00D0 */ int verticalAlign;
|
|
/* 00D4 */ int fontIndex;
|
|
/* 00D8 */ int fontHeight;
|
|
/* 00DC */ unsigned char bold;
|
|
/* 00E0 */ std::uint32_t color;
|
|
/* 00E4 */ bool shadow;
|
|
/* 00E8 */ std::uint32_t shadowColor;
|
|
/* 00EC */ bool outline;
|
|
/* 00F0 */ std::uint32_t outlineColor;
|
|
/* 00F4 */ int textX;
|
|
/* 00F8 */ int textY;
|
|
/* 0080 */ std::string text;
|
|
};
|
|
|
|
#if defined(_WIN32) && !defined(_WIN64)
|
|
static_assert(sizeof(CUIStaticText) == 0x114);
|
|
static_assert(offsetof(CUIStaticText, unknown_0098) == 0x98);
|
|
static_assert(offsetof(CUIStaticText, scrollBar) == 0xC0);
|
|
static_assert(offsetof(CUIStaticText, color) == 0xE0);
|
|
static_assert(offsetof(CUIStaticText, outlineColor) == 0xF0);
|
|
#endif
|
|
|
|
#endif
|