rodecomp/Source/UI/Buttons/UIRadioButton.h
ragnarok-clanker d15e66ec41 Decompile 4 functions in Source/UI/Window/UIControl.cpp, Source/UI/Window/UIControl.h, ...
Batch #4703 by youko: 0 byte-identical, 4 confirmed by peer review.

- fn_14490 CUIImageTextButton::Slot53: logic confirmed by peer review
- fn_14491 CUIImageTextButton::SetImages: logic confirmed by peer review
- fn_14492 CUICheckBox::CUICheckBox: logic confirmed by peer review
- fn_14495 CUIRadioItem::IsChecked: logic confirmed by peer review

Peer-reviewed-by: eAthena, alisonrag, KWDev
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-10-30 06:03:22 +00:00

43 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);
};
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