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:
parent
4976aae627
commit
c17e9e16b4
1 changed files with 22 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue