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:
parent
9d590849e5
commit
d776a0f822
1 changed files with 11 additions and 11 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue