Decompile 2 functions in Source/UI/Lists/UIComboBoxDefWnd.cpp, Source/UI/Lists/UIComboBoxEx.cpp

Batch #17062 by eAthena: 0 byte-identical, 2 confirmed by peer review.

- fn_11544 UIComboBoxDefWnd::SendMsg: logic confirmed by peer review
- fn_11545 UIComboBoxEx::SendMsg: logic confirmed by peer review

Peer-reviewed-by: Yommy, Toshiro, br4yan
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-11-11 13:45:02 +00:00
commit b33ae3a2a0
2 changed files with 8 additions and 4 deletions

View file

@ -180,7 +180,7 @@ int UIComboBoxDefWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st
if (a == ID_OPEN_MEMBER_POS_COMBO) {
this->expanded = this->expanded == 0;
this->Resize(
this->geometry.width, this->expanded ? (this->geometry.height + this->list->geometry.height) : (this->geometry.height - this->list->geometry.height)
this->geometry.width, this->expanded ? (this->list->geometry.height + this->geometry.height) : (this->geometry.height - this->list->geometry.height)
);
this->parent->Invalidate();
this->Invalidate();
@ -202,7 +202,7 @@ int UIComboBoxDefWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st
return 0;
}
this->label->SetText(this->list->lines[value].text.c_str(), 0);
this->label->SetText(LineText(this->list, value), 0);
this->SendMsg(nullptr, UM_COMMAND, ID_OPEN_MEMBER_POS_COMBO, 0, 0, 0);
this->parent->SendMsg(this, UM_COMBOBOX_SELECTED, value, 0, 0, 0);
return 0;
@ -210,7 +210,7 @@ int UIComboBoxDefWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st
case UM_CHANGEMSG: {
const int value = static_cast<int>(a);
if (value >= 0) {
this->label->SetText(this->list->lines[value].text.c_str(), 0);
this->label->SetText(LineText(this->list, value), 0);
this->Invalidate();
}

View file

@ -197,7 +197,11 @@ int UIComboBoxEx::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i
}
case UM_ADDITEM:
this->AddLine(reinterpret_cast<const char*>(a), static_cast<unsigned>(b));
if (b) {
this->AddLine(reinterpret_cast<const char*>(a), static_cast<unsigned>(b));
} else {
this->AddLine(reinterpret_cast<const char*>(a), 0);
}
this->Invalidate();
return 0;