Decompile fn_11436 (UIComboBoxID::Slot31)
Batch #8052 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_11436 UIComboBoxID::Slot31: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, secret, Tanke 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
2617464350
commit
9c276a8cdf
2 changed files with 39 additions and 0 deletions
|
|
@ -2942,6 +2942,44 @@ void UIComboBox::Slot31(int x, int y) {
|
|||
g_windowMgr.CloseWindow(26);
|
||||
}
|
||||
|
||||
// OFFSET: 0x00890C20
|
||||
// FUNCTION: fn_11436
|
||||
void UIComboBoxID::Slot31(int x, int y) {
|
||||
int line = -1;
|
||||
|
||||
if (x >= 0 && y >= 0 && x < this->geometry.width && y < this->geometry.height) {
|
||||
const int index = y / this->lineHeight + this->topLine;
|
||||
|
||||
if (index >= 0 && static_cast<unsigned>(index) < this->lines.size()) {
|
||||
line = index;
|
||||
}
|
||||
}
|
||||
|
||||
this->selected = line;
|
||||
|
||||
if (UIWindow* target = g_windowMgr.LookupWindow(this->targetId)) {
|
||||
int extra = 0;
|
||||
const auto found = this->unknown_00C4.find(this->selected);
|
||||
|
||||
if (found != this->unknown_00C4.end()) {
|
||||
extra = found->second;
|
||||
}
|
||||
|
||||
target->SendMsg(nullptr, 39, this->lines[this->selected].id, extra, 0, 0);
|
||||
} else if (this->parent) {
|
||||
int extra = 0;
|
||||
const auto found = this->unknown_00C4.find(this->selected);
|
||||
|
||||
if (found != this->unknown_00C4.end()) {
|
||||
extra = found->second;
|
||||
}
|
||||
|
||||
this->parent->SendMsg(nullptr, 39, this->lines[this->selected].id, extra, 0, 0);
|
||||
}
|
||||
|
||||
g_windowMgr.CloseWindow(26);
|
||||
}
|
||||
|
||||
// OFFSET: 0x00892990
|
||||
// FUNCTION: fn_11480
|
||||
void UIBasicSkillCtrl::Slot32(int x, int y) {
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ public:
|
|||
void Slot25(int x, int y) override;
|
||||
void Slot26(int x, int y) override;
|
||||
void Slot27(int x, int y) override;
|
||||
void Slot31(int x, int y) override;
|
||||
void Configure(int x, int y, int width, int height, unsigned char transparent) override;
|
||||
int SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) override;
|
||||
void Refresh() override;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue