rodecomp/Source/UI/Lists/UIListBoxNavi.cpp
ragnarok-clanker f08f507fac Decompile fn_45486 (UIListBoxNavi::AddLine)
Batch #10446 by KWDev: 0 byte-identical, 1 confirmed by peer review.

- fn_45486 UIListBoxNavi::AddLine: logic confirmed by peer review

Peer-reviewed-by: vinnyamancio, Toshiro, cremane
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-11-04 01:16:05 +00:00

26 lines
658 B
C++

#include "UI/Lists/UIListBoxNavi.h"
#include <algorithm>
#include <string>
// OFFSET: 0x0086DD10
// FUNCTION: fn_11058
UIListBoxNavi::UIListBoxNavi() : UIListBox(), lineColors(), lineOffset(-1) {
this->defaultLineColor = 0xD2D2D2;
}
// OFFSET: 0x0089BA60
// FUNCTION: fn_11574
void UIListBoxNavi::SetLineOffset(int offset) {
this->lineOffset = offset;
}
// OFFSET: 0x00875F20
// FUNCTION: fn_45486
void UIListBoxNavi::AddLine(const char* text) {
this->lines.push_back(text);
this->lineColors.push_back(0);
const int width = this->TextWidth(text, 0, 0, 12, 0, 0);
this->contentWidth = std::max(this->contentWidth, width);
this->Refresh();
}