Decompile fn_12088 (UIWindow::DrawButtonBar)

Batch #16096 by Yommy: 0 byte-identical, 1 confirmed by peer review.

- fn_12088 UIWindow::DrawButtonBar: logic confirmed by peer review

Peer-reviewed-by: alisonrag, gordaoprogramas, kyoshi
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-11-10 15:14:51 +00:00
commit d776a0f822

View file

@ -121,19 +121,19 @@ int UIWindow::DrawButtonBar(int style, int width, int rows) {
}
auto* middle = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve(name)));
if (!middle) {
return 0;
}
if (middle) {
width = width - rightWidth - leftWidth;
const int middleWidth = middle->image.width;
const int count = width / middleWidth + (width % middleWidth != 0);
width = width - rightWidth - leftWidth;
const int middleWidth = middle->image.width;
const int count = width / middleWidth + (width % middleWidth != 0);
for (int row = 1; row <= rows; ++row) {
for (int column = 0; column < count; ++column) {
this->DrawBitmap(leftWidth + column * middleWidth, this->geometry.height - row * barHeight, middle, false);
for (int row = 1; row <= rows; ++row) {
for (int column = 0; column < count; ++column) {
this->DrawBitmap(leftWidth + column * middleWidth, this->geometry.height - row * barHeight, middle, false);
}
}
return middle->image.height;
}
return middle->image.height;
return 0;
}