Decompile 2 functions in Source/UI/Buttons/UITextButton.cpp, Source/UI/Lists/UITreeView.h

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

- fn_11538 UITreeView::Resize: logic confirmed by peer review
- fn_11516 UITreeView::Slot53: logic confirmed by peer review

Peer-reviewed-by: alisonrag, youko
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 04:43:13 +00:00
commit c6a5dfd45d
2 changed files with 33 additions and 1 deletions

View file

@ -1010,6 +1010,33 @@ void UITreeView::Slot35(int value) {
}
}
// OFFSET: 0x00897A10
// FUNCTION: fn_11538
void UITreeView::Resize(int width, int height) {
UIWindow::Resize(width, height);
this->verticalBar->Move(this->geometry.width - 10, 0);
this->verticalBar->Resize(this->verticalBar->geometry.width, height);
this->Slot53();
}
// OFFSET: 0x008961F0
// FUNCTION: fn_11516
void UITreeView::Slot53() {
const int visible = this->geometry.height / this->itemHeight;
const int count = this->itemCount;
const int excess = count - visible;
const int overflow = excess < 0 ? 0 : excess;
this->verticalOverflow = overflow != 0;
this->verticalBar->SetRange(overflow, visible, count);
if (!overflow) {
this->unknown_00A8 = 0;
this->itemCount = 0;
}
this->verticalBar->Invalidate();
}
// OFFSET: 0x00892F90
// FUNCTION: fn_11502
void UITabControl::FillTab(int index, int x, int y, int width, int height, std::uint32_t color) {

View file

@ -7,10 +7,12 @@ class UIScrollBar;
class UITreeView : public UIWindow {
public:
void Resize(int width, int height) override;
void Slot25(int x, int y) override;
void Slot27(int x, int y) override;
void Slot31(int x, int y) override;
void Slot35(int value) override;
virtual void Slot53();
protected:
/* 007C */ UIScrollBar* verticalBar;
@ -19,7 +21,10 @@ protected:
/* 0088 */ int unknown_0088;
/* 008C */ int unknown_008C;
/* 0090 */ int unknown_0090;
/* 0094 */ unsigned char unknown_0094[0x18];
/* 0094 */ unsigned char unknown_0094[0xC];
/* 00A0 */ int itemHeight;
/* 00A4 */ int itemCount;
/* 00A8 */ int unknown_00A8;
/* 00AC */ unsigned char unknown_00AC;
};