rodecomp/Source/UI/Buttons/UIRadioButton.h
ragnarok-clanker c0eaee9f6c Decompile 3 functions in Source/UI/Window/UIControl.cpp, Source/UI/Window/UIControl.h, ...
Batch #6477 by eAthena: 0 byte-identical, 3 confirmed by peer review.

- fn_14403 CUIBasicButton::Create: logic confirmed by peer review
- fn_14543 CUIRadioButton::Slot25: logic confirmed by peer review
- fn_14571 CUITextButton::SetTextColors: logic confirmed by peer review

Peer-reviewed-by: willerthal, superintelligence
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-10-31 01:04:08 +00:00

44 lines
1.1 KiB
C++

#ifndef RAGNAROK_SOURCE_UI_BUTTONS_UIRADIOBUTTON_H
#define RAGNAROK_SOURCE_UI_BUTTONS_UIRADIOBUTTON_H
#include "UI/Window/UIControl.h"
#include <cstddef>
#include <functional>
class CUICheckBox : public CUIImageButton {
public:
/* 0120 */ bool checked;
/* 0128 */ std::function<void(bool)> onCheck;
explicit CUICheckBox(UIWindowContext& context);
void SetOnCheck(std::function<void(bool)> callback);
void Paint() override;
void Slot25(int x, int y) override;
void Slot31(int x, int y) override;
};
class CUIRadioButton : public CUICheckBox {
public:
/* 0150 */ std::function<void(CUIRadioButton*)> onSelect;
void SetOnSelect(std::function<void(CUIRadioButton*)> callback);
void Slot25(int x, int y) override;
};
class CUIRadioItem : public CUIControl {
public:
/* 0080 */ CUIRadioButton* radioButton;
bool IsChecked();
};
#if defined(_WIN32) && !defined(_WIN64)
static_assert(offsetof(CUICheckBox, onCheck) == 0x128);
static_assert(sizeof(CUICheckBox) == 0x150);
static_assert(offsetof(CUIRadioButton, onSelect) == 0x150);
static_assert(sizeof(CUIRadioButton) == 0x178);
#endif
#endif