From 4dbdfe9a680623b3bb032f934346540af8a5f0ed Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sat, 31 Oct 2026 12:21:25 +0000 Subject: [PATCH] Decompile fn_11057 (UIListBoxID::UIListBoxID) Batch #7850 by secret: 0 byte-identical, 1 confirmed by peer review. - fn_11057 UIListBoxID::UIListBoxID: logic confirmed by peer review Peer-reviewed-by: eAthena, pedrao Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Lists/UIScrollBar.cpp | 13 +++++++++++++ Source/UI/Lists/UIScrollBarVariants.h | 4 ++++ 2 files changed, 17 insertions(+) diff --git a/Source/UI/Lists/UIScrollBar.cpp b/Source/UI/Lists/UIScrollBar.cpp index a9c6523c..2af6a81a 100644 --- a/Source/UI/Lists/UIScrollBar.cpp +++ b/Source/UI/Lists/UIScrollBar.cpp @@ -1264,3 +1264,16 @@ int UITreeView::RemoveChildNode(UITreeNode* parent, int id, bool keepButtons) { bool UIGage::CanHitTest() { return false; } + +// OFFSET: 0x0086DBD0 +// FUNCTION: fn_11057 +UIListBoxID::UIListBoxID() + : UIWindow(*reinterpret_cast(nullptr), 0), lines(), selected(0), topLine(0), horizontalOffset(0), contentWidth(0), verticalOverflow(0), + bottomMargin(0), verticalBar(nullptr), horizontalBar(nullptr), transparent(0), lineHeight(16) { + int* background = reinterpret_cast(this->unknown_007C); + background[0] = 255; + background[1] = 255; + background[2] = 255; + const SkinPaletteCell cell = {3, 2}; + this->selectionColor = SkinPaletteColor(ResourceMgr::Instance(), cell, g_skinInfo.Selected()); +} diff --git a/Source/UI/Lists/UIScrollBarVariants.h b/Source/UI/Lists/UIScrollBarVariants.h index 34db0527..ef5327b4 100644 --- a/Source/UI/Lists/UIScrollBarVariants.h +++ b/Source/UI/Lists/UIScrollBarVariants.h @@ -5,6 +5,10 @@ #include +#include "Contents/SkinMgr.h" +#include "Resource/SkinPalette.h" +#include "UI/Lists/UIListBoxID.h" + class CBitmapRes; class UIScrollBar2 : public UIScrollBar {