Batch #15085 by Yommy: 30 byte-identical, 21 confirmed by peer review. - fn_14031 CUIListBox<AdventureGuide::CUITab>::LoadSkin: byte-identical - fn_14030 CUIListBox<AdventureGuide::CUISubTab>::LoadSkin: byte-identical - fn_14718 CUIThumb::LoadSkin: byte-identical - fn_14699 CUITitleBar::LoadSkin: byte-identical - fn_16815 CUIListBoxEx<SkillDelayInfo::CUIDelayItem,SkillDelayInfo::CDelayItemData>::LoadSkin: byte-identical - fn_16673 CUIListBoxEx<SelectPackageItemBox::CUITabInfo,SelectPackageItemBox::CTabInfoData>::LoadSkin: byte-identical - fn_16672 CUIListBoxEx<SelectPackageItemBox::CUIItemInfo,ITEM_INFO>::LoadSkin: byte-identical - fn_16442 CUIListBoxEx<RenewQuestUI::CUIQuestItem,unsigned long>::LoadSkin: byte-identical - fn_16234 CUIListBoxEx<OngoingQuestInfo::CUIRewardItem,OngoingQuestInfo::CRewardItemData>::LoadSkin: byte-identical - fn_16123 CUIListBoxEx<ProbabilityTable::CUIItem,ProbabilityTable::CItemData>::LoadSkin: byte-identical - fn_15431 CUIListBoxEx<GameSettingsUI::CUIOptionItem,TALKTYPE>::LoadSkin: byte-identical - fn_15430 CUIListBoxEx<GameSettingsUI::CUIComboItem,std::basic_string<char,std::char_traits<char>,std::allocator<char> > >::LoadSkin: byte-identical - fn_15429 CUIListBoxEx<GameSettingsUI::CUIComboItem,RenderBackend>::LoadSkin: byte-identical - fn_15428 CUIListBoxEx<GameSettingsUI::CUIComboItem,DisplayMode>::LoadSkin: byte-identical - fn_15427 CUIListBoxEx<GameSettingsUI::CUIComboItem,RenderAdapter>::LoadSkin: byte-identical - fn_15198 CUIListBoxEx<ExchangeUI::CUIItem,ExchangeUI::CItemData>::LoadSkin: byte-identical - fn_15040 CUIListBoxEx<EquipmentPropertiesWnd::CUIItemEquipmentPropertiesLine,std::basic_string<char,std::char_traits<char>,std::allocator<char> > >::LoadSkin: byte-identical - fn_14840 CUIListBoxEx<EnchantUI::CUITargetItem,ITEM_INFO>::LoadSkin: byte-identical - fn_14839 CUIListBoxEx<EnchantUI::CUIEnchantItem,EnchantUI::CEnchantItemData>::LoadSkin: byte-identical - fn_14719 CUIVScrollBar::LoadSkin: byte-identical - fn_14667 CUIStaticImage::LoadSkin: byte-identical - fn_14650 CUIImageButton::LoadSkin: byte-identical - fn_14035 CUIListBoxEx<AdventureGuide::CUITabInfo,Guide_Intro::Contents>::LoadSkin: byte-identical - fn_14034 CUIListBoxEx<AdventureGuide::CUIQuestInfo,AdventureGuide::CQuestInfo>::LoadSkin: byte-identical - fn_14033 CUIListBoxEx<AdventureGuide::CUIMonsterInfo,AdventureGuide::CMonsterData>::LoadSkin: byte-identical - fn_14032 CUIListBoxEx<AdventureGuide::CUIItemInfo,AdventureGuide::CItemData>::LoadSkin: byte-identical - fn_14490 CUIImageTextButton::LoadSkin: byte-identical - fn_18815 CEZ2STRParticle::ReleaseResource: byte-identical - fn_14508 CUIResizer::LoadSkin: byte-identical - fn_18819 CEZ2STRParticle::Open: logic confirmed by peer review (already on main) - fn_18817 CEZ2STRParticle::Clear: byte-identical - fn_14694 CUITabButton::LoadSkin: logic confirmed by peer review - fn_18813 CEZ2STRParticle::CEZ2STRParticle: logic confirmed by peer review (already on main) - fn_14406 CUIBasicButton::LoadSkin: logic confirmed by peer review - fn_16122 CUIListBoxEx<ProbabilityTable::CUIItem,ProbabilityTable::CItemData>::AddNewItem: logic confirmed by peer review - fn_15200 CUIListBoxEx<ExchangeUI::CUIItem,ExchangeUI::CItemData>::OnScroll: logic confirmed by peer review - fn_15033 CUIEquipmentPropertiesWnd::Initialize: logic confirmed by peer review - fn_15035 CUIEquipmentPropertiesWnd::OnCreate: logic confirmed by peer review - fn_15039 CUIListBoxEx<EquipmentPropertiesWnd::CUIItemEquipmentPropertiesLine,std::basic_string<char,std::char_traits<char>,std::allocator<char> > >::AddNewItem: logic confirmed by peer review - fn_15042 CUIListBoxEx<EquipmentPropertiesWnd::CUIItemEquipmentPropertiesLine,std::basic_string<char,std::char_traits<char>,std::allocator<char> > >::OnScroll: logic confirmed by peer review - fn_15171 CUIEquipmentPropertiesWnd::SetTab: logic confirmed by peer review - fn_16229 OngoingQuestInfo::CUIRewards::OnCreate: logic confirmed by peer review - fn_16233 CUIListBoxEx<OngoingQuestInfo::CUIRewardItem,OngoingQuestInfo::CRewardItemData>::AddNewItem: logic confirmed by peer review - fn_16317 CUIOngoingQuestInfo::SetQuest: logic confirmed by peer review - fn_16814 CUIListBoxEx<SkillDelayInfo::CUIDelayItem,SkillDelayInfo::CDelayItemData>::AddNewItem: logic confirmed by peer review - fn_16872 CUISkillDelayInfo::CUISkillDelayInfo: logic confirmed by peer review - fn_16434 RenewQuestUI::CUIQuestItem::OnCreate: logic confirmed by peer review - fn_16436 CUIRenewQuestUI::OnCreate: logic confirmed by peer review - fn_16439 CUIListBoxEx<RenewQuestUI::CUIQuestItem,unsigned long>::AddNewItem: logic confirmed by peer review - fn_16444 CUIListBoxEx<RenewQuestUI::CUIQuestItem,unsigned long>::OnScroll: logic confirmed by peer review - fn_16624 CUIRenewQuestUI::OnInit: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker Reviewed-by: ragnarok-clanker
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 OnCreate(int width, int height) override;
|
|
void Paint() override;
|
|
void OnLBtnDown(int x, int y) override;
|
|
void OnWheel(int value) override;
|
|
void LoadSkin(bool resolveSkin) override;
|
|
virtual void UpdateThumb();
|
|
virtual void ScrollBy(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 OnCreate(int width, int height) override;
|
|
void Paint() override;
|
|
void OnLBtnDown(int x, int y) override;
|
|
void OnWheel(int value) override;
|
|
void UpdateThumb() 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
|