Decompile 2 functions in Source/UI/WindowTitlebar.cpp
Batch #12340 by cremane: 0 byte-identical, 2 confirmed by peer review. - fn_12098 UIWindow::DrawTitleBar: logic confirmed by peer review - fn_12099 UIWindow::DrawTitleBarAt: logic confirmed by peer review Peer-reviewed-by: Yommy, dori, codeplay 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
98608626b9
commit
d8af7ca006
1 changed files with 7 additions and 4 deletions
|
|
@ -27,13 +27,14 @@ int UIWindow::DrawTitleBar(bool closeButton, const char* title, int width) {
|
|||
|
||||
auto* middle = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\titlebar_mid.bmp")));
|
||||
if (middle) {
|
||||
const int middleWidth = middle->image.width;
|
||||
titleHeight = middle->image.height;
|
||||
const int extent = width - right - left;
|
||||
const int count = extent / middle->image.width + (extent % middle->image.width != 0);
|
||||
const int count = extent / middleWidth + (extent % middleWidth != 0);
|
||||
|
||||
for (int index = 0; index < count; ++index) {
|
||||
this->DrawBitmap(left, 0, &middle->image, false);
|
||||
left += middle->image.width;
|
||||
left += middleWidth;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -72,12 +73,14 @@ int UIWindow::DrawTitleBarAt(int x, int width, bool closeButton, const char* tit
|
|||
|
||||
auto* middle = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\titlebar_mid.bmp")));
|
||||
if (middle) {
|
||||
const int middleWidth = middle->image.width;
|
||||
titleHeight = middle->image.height;
|
||||
const int extent = width - right - left;
|
||||
const int count = extent / middle->image.width + (extent % middle->image.width != 0);
|
||||
const int count = extent / middleWidth + (extent % middleWidth != 0);
|
||||
|
||||
for (int index = 0; index < count; ++index) {
|
||||
this->DrawBitmap(x + left + index * middle->image.width, 0, &middle->image, false);
|
||||
this->DrawBitmap(x + left, 0, &middle->image, false);
|
||||
left += middleWidth;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue