Decompile 3 functions in Source/UI/Window/UIControl.cpp, Source/UI/Text/UIStaticTextControl.h
Batch #5219 by eAthena: 0 byte-identical, 3 confirmed by peer review. - fn_14675 CUIStaticText::SetColor: logic confirmed by peer review - fn_14678 CUIStaticText::SetOutline: logic confirmed by peer review - fn_14679 CUIStaticText::SetShadow: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, meitogi, alisonrag Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
parent
8536bb930c
commit
47ce51bb61
2 changed files with 44 additions and 1 deletions
|
|
@ -3,21 +3,42 @@
|
|||
|
||||
#include "UI/Window/UIControl.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
class CUIVScrollBar;
|
||||
|
||||
class CUIStaticText : public CUIControl {
|
||||
public:
|
||||
void SetColor(std::uint32_t color);
|
||||
void SetOutline(bool enabled, std::uint32_t color);
|
||||
void SetShadow(bool enabled, std::uint32_t color);
|
||||
|
||||
/* 0080 */ std::string text;
|
||||
/* 0098 */ std::string unknown_0098;
|
||||
/* 00B0 */ unsigned char unknown_00B0[0x0C];
|
||||
/* 00C0 */ CUIVScrollBar* scrollBar;
|
||||
/* 00C4 */ unsigned char unknown_00C4[0x38];
|
||||
/* 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;
|
||||
};
|
||||
|
||||
#if defined(_WIN32) && !defined(_WIN64)
|
||||
static_assert(sizeof(CUIStaticText) == 0xFC);
|
||||
static_assert(offsetof(CUIStaticText, color) == 0xE0);
|
||||
static_assert(offsetof(CUIStaticText, outlineColor) == 0xF0);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
#include "Resource/TextureNames.h"
|
||||
#include "UI/Window/UIWindowMgr.h"
|
||||
#include "UI/Window/UIPadding.h"
|
||||
#include "UI/Text/UIStaticTextControl.h"
|
||||
#include "UI/Text/UITextViewerControl.h"
|
||||
#include "UI/Lists/UIVScrollBar.h"
|
||||
#include "Render/Text/FontCache.h"
|
||||
|
|
@ -811,6 +812,27 @@ void CUIStaticImage::SetImage(const std::string& name) {
|
|||
this->Invalidate();
|
||||
}
|
||||
|
||||
// OFFSET: 0x009F0DA0
|
||||
// FUNCTION: fn_14675
|
||||
void CUIStaticText::SetColor(std::uint32_t color) {
|
||||
this->color = color;
|
||||
this->Invalidate();
|
||||
}
|
||||
|
||||
// OFFSET: 0x009F0E10
|
||||
// FUNCTION: fn_14678
|
||||
void CUIStaticText::SetOutline(bool enabled, std::uint32_t color) {
|
||||
this->outline = enabled;
|
||||
this->outlineColor = color;
|
||||
}
|
||||
|
||||
// OFFSET: 0x009F0E30
|
||||
// FUNCTION: fn_14679
|
||||
void CUIStaticText::SetShadow(bool enabled, std::uint32_t color) {
|
||||
this->shadow = enabled;
|
||||
this->shadowColor = color;
|
||||
}
|
||||
|
||||
// OFFSET: 0x009F1C40
|
||||
|
||||
// OFFSET: 0x009F1BF0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue