Decompile 2 functions in Source/UI/Lists/UIListBox.cpp
Batch #18108 by eAthena: 0 byte-identical, 2 confirmed by peer review. - fn_11512 UIListBox::Refresh: logic confirmed by peer review - fn_11552 UIListBox::SendMsg: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, alisonrag, bibinir 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
e7b32e7969
commit
a69a4699ff
1 changed files with 14 additions and 13 deletions
|
|
@ -270,10 +270,11 @@ void UIListBox::Refresh() {
|
|||
UIScrollBar* bar = this->verticalBar;
|
||||
if (overflow != 0) {
|
||||
bar->maximum = this->bottomMargin + overflow;
|
||||
bar->total = static_cast<int>(this->lines.size());
|
||||
} else {
|
||||
bar->maximum = 0;
|
||||
bar->total = static_cast<int>(this->lines.size());
|
||||
}
|
||||
bar->total = static_cast<int>(this->lines.size());
|
||||
bar->visible = visible;
|
||||
bar->Invalidate();
|
||||
|
||||
|
|
@ -387,18 +388,6 @@ int UIListBox::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, s
|
|||
|
||||
break;
|
||||
|
||||
case UM_DOWNPUSH:
|
||||
this->selected = (this->selected + 1);
|
||||
if (this->selected > this->lines.size() - 1) {
|
||||
this->selected = this->lines.size() - 1;
|
||||
}
|
||||
|
||||
if (this->selected > this->topLine - 1 + this->geometry.height / this->lineHeight) {
|
||||
this->SendMsg(nullptr, UM_SCROLLVERT, 1, 0, 0, 0);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case UM_UPPUSH:
|
||||
this->selected = (this->selected - 1);
|
||||
|
||||
|
|
@ -412,6 +401,18 @@ int UIListBox::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, s
|
|||
|
||||
break;
|
||||
|
||||
case UM_DOWNPUSH:
|
||||
this->selected = (this->selected + 1);
|
||||
if (this->selected > this->lines.size() - 1) {
|
||||
this->selected = this->lines.size() - 1;
|
||||
}
|
||||
|
||||
if (this->selected > this->topLine - 1 + this->geometry.height / this->lineHeight) {
|
||||
this->SendMsg(nullptr, UM_SCROLLVERT, 1, 0, 0, 0);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case UM_SCROLLVERT:
|
||||
case UM_SCROLLVERTPAGEUP:
|
||||
case UM_SCROLLVERTPAGEDOWN: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue