From 715e4e7cde38d6787ede8439da8fbfc434ba8da0 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Wed, 28 Oct 2026 22:02:36 +0000 Subject: [PATCH] Decompile fn_11283 (UITabControl::TabCount) Batch #1756 by ragnarok-clanker: 1 byte-identical, 0 confirmed by peer review. - fn_11283 UITabControl::TabCount: byte-identical Merged automatically: every function is byte-identical to the original. --- Source/UI/Lists/UIChatHisBox.h | 17 +++++++++++++++++ Source/UI/Lists/UIImgMenu.h | 16 ++++++++++++++++ Source/UI/Lists/UIListBoxEx.h | 1 + Source/UI/Lists/UIScrollBar.cpp | 18 ++++++++++++++++++ Source/UI/Lists/UITabControl.h | 21 +++++++++++++++++++++ 5 files changed, 73 insertions(+) create mode 100644 Source/UI/Lists/UIChatHisBox.h create mode 100644 Source/UI/Lists/UIImgMenu.h create mode 100644 Source/UI/Lists/UITabControl.h diff --git a/Source/UI/Lists/UIChatHisBox.h b/Source/UI/Lists/UIChatHisBox.h new file mode 100644 index 0000000..9fc9071 --- /dev/null +++ b/Source/UI/Lists/UIChatHisBox.h @@ -0,0 +1,17 @@ +#ifndef RAGNAROK_SOURCE_UI_LISTS_UICHATHISBOX_H +#define RAGNAROK_SOURCE_UI_LISTS_UICHATHISBOX_H + +#include "UI/Lists/UIListBox.h" + +#include +#include + +class UIChatHisBox : public UIListBox { +public: + const char* HistoryText(unsigned int index); + + /* 00DC */ unsigned char unknown_00DC[0x18]; + /* 00F4 */ std::vector history; +}; + +#endif diff --git a/Source/UI/Lists/UIImgMenu.h b/Source/UI/Lists/UIImgMenu.h new file mode 100644 index 0000000..ef2b5ed --- /dev/null +++ b/Source/UI/Lists/UIImgMenu.h @@ -0,0 +1,16 @@ +#ifndef RAGNAROK_SOURCE_UI_LISTS_UIIMGMENU_H +#define RAGNAROK_SOURCE_UI_LISTS_UIIMGMENU_H + +#include "UI/Window/UIWindow.h" + +class UIImgMenu : public UIWindow { +public: + int ItemAt(int x, int y); + + /* 0080 */ int count; + /* 0084 */ int itemWidth; + /* 0088 */ int itemHeight; + /* 008C */ int horizontal; +}; + +#endif diff --git a/Source/UI/Lists/UIListBoxEx.h b/Source/UI/Lists/UIListBoxEx.h index 00a719e..20a722b 100644 --- a/Source/UI/Lists/UIListBoxEx.h +++ b/Source/UI/Lists/UIListBoxEx.h @@ -29,6 +29,7 @@ public: virtual void AddLine(const char* text, std::uint32_t color); virtual void Clear(); virtual void Refresh(); + int FindLine(const std::string& text); /* 007C */ int backgroundRed; /* 0080 */ int backgroundGreen; diff --git a/Source/UI/Lists/UIScrollBar.cpp b/Source/UI/Lists/UIScrollBar.cpp index 284bc5a..601aa9c 100644 --- a/Source/UI/Lists/UIScrollBar.cpp +++ b/Source/UI/Lists/UIScrollBar.cpp @@ -4,6 +4,10 @@ #include "Resource/ResourceMgr.h" #include "UI/Window/UIWindowMgr.h" #include "UI/Lists/UIScrollBar.h" +#include "UI/Lists/UIChatHisBox.h" +#include "UI/Lists/UIImgMenu.h" +#include "UI/Lists/UIListBoxEx.h" +#include "UI/Lists/UITabControl.h" #include @@ -315,3 +319,17 @@ void UIScrollBar::Configure(int x, int y, unsigned char vertical, int length) { this->Slot15(width, height); this->Slot22(width, height); } + +// OFFSET: 0x00880800 + +// OFFSET: 0x00880920 + +// OFFSET: 0x00880B20 +// FUNCTION: fn_11283 +int UITabControl::TabCount() { + return static_cast(this->labels.size()); +} + +// OFFSET: 0x00880B40 + +// OFFSET: 0x00880BB0 diff --git a/Source/UI/Lists/UITabControl.h b/Source/UI/Lists/UITabControl.h new file mode 100644 index 0000000..919e4cd --- /dev/null +++ b/Source/UI/Lists/UITabControl.h @@ -0,0 +1,21 @@ +#ifndef RAGNAROK_SOURCE_UI_LISTS_UITABCONTROL_H +#define RAGNAROK_SOURCE_UI_LISTS_UITABCONTROL_H + +#include "UI/Window/UIWindow.h" + +#include +#include + +class UITabControl : public UIWindow { +public: + int TabCount(); + int TabAt(int x, int y); + + /* 0080 */ int layout; + /* 0084 */ unsigned char unknown_0084[0x30]; + /* 00B4 */ std::vector labels; + /* 00C0 */ unsigned char unknown_00C0[0xC]; + /* 00CC */ std::vector widths; +}; + +#endif