rodecomp/Source/UI/Lists/UIThumb.h
ragnarok-clanker a95cc0a839 Decompile 3 functions in Source/UI/Window/UIControl.cpp, Source/UI/Lists/UIThumb.h, ...
Batch #9553 by ragnarok-clanker: 0 byte-identical, 3 confirmed by peer review.

- fn_17127 UIWindowMgr::RefreshFrameSkins: logic confirmed by peer review (already on main)
- fn_16052 CUIMacroReport::Slot53: logic confirmed by peer review
- fn_13944 CUIImageButton::CUIImageButton: logic confirmed by peer review

Peer-reviewed-by: Yommy, pedrao, ragnarok-clanker, Snow, SapitoSucio, alisonrag, tayoba
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-11-01 15:10:39 +00:00

59 lines
1.7 KiB
C++

#ifndef RAGNAROK_SOURCE_UI_LISTS_UITHUMB_H
#define RAGNAROK_SOURCE_UI_LISTS_UITHUMB_H
#include "UI/Window/UIControl.h"
#include <cstddef>
#include <functional>
#include <string>
class CUIThumb : public CUIControl {
public:
explicit CUIThumb(UIWindowContext& context);
~CUIThumb() override;
void ResetCursor(int x, int y) override;
void Slot28(int x, int y) override;
void Slot53(int resolveSkin) override;
__declspec(noinline) void SetImages(const std::string& top, const std::string& middle, const std::string& bottom);
void SetImage(const std::string& name);
/* 0084 */ CResPtr<CBitmapRes> top;
/* 0088 */ CResPtr<CBitmapRes> middle;
/* 008C */ CResPtr<CBitmapRes> bottom;
/* 0090 */ int dragOrigin;
/* 0094 */ unsigned char transparent;
/* 0080 */ unsigned char resizable;
/* 0098 */ std::string tooltip;
/* 00B0 */ std::string topName;
/* 00C8 */ std::string middleName;
/* 00E0 */ std::string bottomName;
/* 00F8 */ std::function<void(int)> onDrag;
};
class CUIVThumb : public CUIThumb {
public:
explicit CUIVThumb(UIWindowContext& context);
void Paint() override;
void Slot25(int x, int y) override;
void Slot27(int x, int y) override;
void Slot31(int x, int y) override;
};
class CUIHThumb : public CUIVThumb {
public:
explicit CUIHThumb(UIWindowContext& context);
void Paint() override;
void Slot25(int x, int y) override;
void Slot27(int x, int y) override;
void Slot31(int x, int y) override;
};
#if defined(_WIN32) && !defined(_WIN64)
static_assert(offsetof(CUIThumb, dragOrigin) == 0x90);
static_assert(offsetof(CUIThumb, tooltip) == 0x98);
static_assert(offsetof(CUIThumb, onDrag) == 0xF8);
static_assert(sizeof(CUIThumb) == 0x120);
#endif
#endif