Decompile fn_14355 (CUIListBox<AdventureGuide::CUITab>::SelectItem)

Batch #5188 by Yommy: 0 byte-identical, 1 confirmed by peer review.

- fn_14355 CUIListBox<AdventureGuide::CUITab>::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).
This commit is contained in:
ragnarok-clanker 2026-10-30 09:17:07 +00:00
commit c17e9e16b4

View file

@ -292,5 +292,27 @@ void CUIListBox<AdventureGuide::CUISubTab>::SelectItem(CUIListItem* item) {
}
// OFFSET: 0x009DE560
// FUNCTION: fn_14355
template <>
void CUIListBox<AdventureGuide::CUITab>::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<AdventureGuide::CUITab*>(item);
if (selected) {
this->selected = selected;
if (this->onSelect) {
this->onSelect(selected);
}
}
}
}
// OFFSET: 0x009DEBF0