Decompile fn_16959 (UIWindow::WrapFormattedText)
Batch #9418 by secret: 0 byte-identical, 1 confirmed by peer review. - fn_16959 UIWindow::WrapFormattedText: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, gordaoprogramas, Bielhp 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
5cf2d9789a
commit
1e32b3232a
1 changed files with 4 additions and 2 deletions
|
|
@ -1654,7 +1654,7 @@ const char* UIWindow::TruncateText(const char* text, int maxBytes) {
|
|||
std::list<int> UIWindow::WrapFormattedText(std::string text, std::list<std::string>* lines, int maxWidth, int family, int height, unsigned char bold) {
|
||||
lines->clear();
|
||||
if (maxWidth <= 0) {
|
||||
maxWidth = this->FormattedTextWidth(text, family, height, bold);
|
||||
maxWidth = this->FormattedTextWidth(text.c_str(), family, height, bold);
|
||||
}
|
||||
|
||||
std::list<int> widths;
|
||||
|
|
@ -1737,7 +1737,7 @@ std::list<int> UIWindow::WrapFormattedText(std::string text, std::list<std::stri
|
|||
}
|
||||
}
|
||||
|
||||
if (width + characterWidth > maxWidth) {
|
||||
if (maxWidth < characterWidth + width) {
|
||||
lines->push_back(line);
|
||||
if (colorCode.empty()) {
|
||||
line.clear();
|
||||
|
|
@ -3167,3 +3167,5 @@ void UINavigationV4Wnd::DrawTargetSprite(int x, int y, int width, int height, co
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// OFFSET: 0x00A84400
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue