From c17e9e16b4256ff9790056a433314c44ad18ac09 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 30 Oct 2026 09:17:07 +0000 Subject: [PATCH] Decompile fn_14355 (CUIListBox::SelectItem) Batch #5188 by Yommy: 0 byte-identical, 1 confirmed by peer review. - fn_14355 CUIListBox::SelectItem: logic confirmed by peer review Peer-reviewed-by: eAthena, alisonrag Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/AdventureGuide/UIAdventureGuide.cpp | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Source/UI/AdventureGuide/UIAdventureGuide.cpp b/Source/UI/AdventureGuide/UIAdventureGuide.cpp index 8912c585..e44777be 100644 --- a/Source/UI/AdventureGuide/UIAdventureGuide.cpp +++ b/Source/UI/AdventureGuide/UIAdventureGuide.cpp @@ -292,5 +292,27 @@ void CUIListBox::SelectItem(CUIListItem* item) { } // OFFSET: 0x009DE560 +// FUNCTION: fn_14355 +template <> +void CUIListBox::SelectItem(CUIListItem* item) { + if (this->locked) { + return; + } + for (AdventureGuide::CUITab* entry : this->items) { + if (entry != item) { + entry->SetSelected(false); + } + } + item->SetSelected(true); + if (this->selected != item) { + AdventureGuide::CUITab* selected = dynamic_cast(item); + if (selected) { + this->selected = selected; + if (this->onSelect) { + this->onSelect(selected); + } + } + } +} // OFFSET: 0x009DEBF0