Batch #13837 by eAthena: 0 byte-identical, 5 confirmed by peer review. - fn_15034 CUIListBoxEx<EquipmentPropertiesWnd::CUIItemEquipmentPropertiesLine,std::basic_string<char,std::char_traits<char>,std::allocator<char> > >::Slot15: logic confirmed by peer review (already on main) - fn_15190 CUIListBoxEx<ExchangeUI::CUIItem,ExchangeUI::CItemData>::Slot15: logic confirmed by peer review (already on main) - fn_16117 CUIListBoxEx<ProbabilityTable::CUIItem,ProbabilityTable::CItemData>::Slot15: logic confirmed by peer review (already on main) - fn_16433 CUIListBoxEx<RenewQuestUI::CUIQuestItem,unsigned long>::Slot15: logic confirmed by peer review (already on main) - fn_16808 CUIListBoxEx<SkillDelayInfo::CUIDelayItem,SkillDelayInfo::CDelayItemData>::Slot15: logic confirmed by peer review (already on main) Peer-reviewed-by: Yommy, aDw, codeplay, KWDev Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
87 lines
3 KiB
C++
87 lines
3 KiB
C++
#ifndef RAGNAROK_SOURCE_UI_LISTS_UIVSCROLLBAR_H
|
|
#define RAGNAROK_SOURCE_UI_LISTS_UIVSCROLLBAR_H
|
|
|
|
#include "UI/Lists/UIThumb.h"
|
|
#include "UI/Window/UIControl.h"
|
|
|
|
#include <cstddef>
|
|
#include <functional>
|
|
#include <string>
|
|
|
|
class CUIVScrollBar : public CUIControl {
|
|
public:
|
|
CUIVScrollBar();
|
|
~CUIVScrollBar() override;
|
|
void Resize(int width, int height) override;
|
|
void Show(int visible) override;
|
|
void Slot15(int width, int height) override;
|
|
void Paint() override;
|
|
void Slot25(int x, int y) override;
|
|
void Slot35(int value) override;
|
|
void Slot53(int resolveSkin) override;
|
|
virtual void Slot54();
|
|
virtual void Slot55(int value);
|
|
|
|
__declspec(noinline) void SetTotal(int value);
|
|
__declspec(noinline) void SetVisible(int value);
|
|
__declspec(noinline) void SetPosition(int value);
|
|
__declspec(noinline) void PageUp();
|
|
__declspec(noinline) void PageDown();
|
|
int PositionFromOffset(int offset);
|
|
void SetHidden(int unused);
|
|
__declspec(noinline) void SetButtonImages(const std::string& up, const std::string& down);
|
|
void SetTransparent(bool transparent);
|
|
__declspec(noinline) void SetThumbImages(const std::string& top, const std::string& middle, const std::string& bottom);
|
|
__declspec(noinline) void SetThumbImage(const std::string& name);
|
|
void SetThumbTooltip(const std::string& text);
|
|
__declspec(noinline) void SetBackground(const std::string& name);
|
|
void SetOnChange(std::function<void(int)> handler);
|
|
|
|
|
|
/* 0080 */ CUIImageButton* upButton;
|
|
/* 0084 */ CUIImageButton* downButton;
|
|
/* 0088 */ CUIThumb* thumb;
|
|
/* 008C */ CResPtr<CBitmapRes> background;
|
|
/* 0090 */ int total;
|
|
/* 0094 */ int visible;
|
|
/* 0098 */ int step;
|
|
/* 009C */ int position;
|
|
/* 00A0 */ int maximum;
|
|
/* 00A4 */ int trackLength;
|
|
/* 00A8 */ unsigned char dragging;
|
|
/* 00A9 */ unsigned char hidden;
|
|
/* 00AA */ unsigned char transparent;
|
|
/* 00AC */ std::string backgroundName;
|
|
/* 00C4 */ int unknown_00C4;
|
|
/* 00C8 */ std::function<void(int)> onChange;
|
|
};
|
|
|
|
class CUIHScrollBar : public CUIVScrollBar {
|
|
public:
|
|
CUIHScrollBar();
|
|
void Resize(int width, int height) override;
|
|
void Slot15(int width, int height) override;
|
|
void Paint() override;
|
|
void Slot25(int x, int y) override;
|
|
void Slot35(int value) override;
|
|
void Slot54() override;
|
|
|
|
void SetButtonImages(const std::string& left, const std::string& right);
|
|
void SetThumbImages(const std::string& top, const std::string& middle, const std::string& bottom);
|
|
};
|
|
|
|
#if defined(_WIN32) && !defined(_WIN64)
|
|
static_assert(offsetof(CUIVScrollBar, total) == 0x90);
|
|
static_assert(offsetof(CUIVScrollBar, dragging) == 0xA8);
|
|
static_assert(offsetof(CUIVScrollBar, backgroundName) == 0xAC);
|
|
static_assert(offsetof(CUIVScrollBar, onChange) == 0xC8);
|
|
#endif
|
|
|
|
// OFFSET: 0x009BE480
|
|
// FUNCTION: fn_13948
|
|
inline CUIVScrollBar::CUIVScrollBar()
|
|
: CUIControl(), downButton(nullptr), thumb(nullptr), total(1), visible(1), step(1), position(0), maximum(0), trackLength(1), dragging(0),
|
|
hidden(0), transparent(0), upButton(nullptr) {
|
|
}
|
|
|
|
#endif
|