rodecomp/Source/UI/WindowTitlebar.cpp
ragnarok-clanker f464cd3f17 Decompile 41 functions in Source/Client/Input/InputCharset.cpp, Source/Client/Input/InputCharset.h, ...
Batch #1607 by ragnarok-clanker: 0 byte-identical, 41 confirmed by peer review.

- fn_11718 DrawItemIconById: logic confirmed by peer review
- fn_11719 DrawItemSlotBackground: logic confirmed by peer review
- fn_11721 UICntWnd::DrawBorder: logic confirmed by peer review
- fn_11760 UIBank_NewWnd::Paint: logic confirmed by peer review
- fn_11761 UIChatRoomWnd::Paint: logic confirmed by peer review
- fn_11767 UIMerInfoWnd::Paint: logic confirmed by peer review
- fn_12085 UIWindow::DrawPanelBackground: logic confirmed by peer review
- fn_12086 UIWindow::DrawPanelBackgroundAt: logic confirmed by peer review
- fn_12088 UIWindow::DrawButtonBar: logic confirmed by peer review
- fn_12089 UIWindow::DrawButtonBarAt: logic confirmed by peer review
- fn_12098 UIWindow::DrawTitleBar: logic confirmed by peer review
- fn_12099 UIWindow::DrawTitleBarAt: logic confirmed by peer review
- fn_12120 UIWindow::LoadStyledBitmap: logic confirmed by peer review
- fn_12219 UIDisconnectedServerMsgWnd::Paint: logic confirmed by peer review
- fn_12233 UINoticeConfirmWnd::Paint: logic confirmed by peer review
- fn_12245 UIQuitWnd::Paint: logic confirmed by peer review
- fn_12246 UIRestartWnd::Paint: logic confirmed by peer review
- fn_12258 UIWaitWnd::Paint: logic confirmed by peer review
- fn_14470 CUIFrameWnd::RefreshSkinColors: logic confirmed by peer review
- fn_14471 CUIFrameWnd::Paint: logic confirmed by peer review
- fn_14472 CUIFrameWnd::SetSkinColors: logic confirmed by peer review
- fn_14635 CUIControl::LoadBitmapResource: logic confirmed by peer review
- fn_17781 InputCharset::Prefix: logic confirmed by peer review
- fn_17788 InputCharset::ServiceName: logic confirmed by peer review
- fn_17847 FadeOutMode: logic confirmed by peer review
- fn_18378 Resolve: logic confirmed by peer review
- fn_02111 RendererDX7Operations::SaveLogo: logic confirmed by peer review
- fn_09446 UICashEmotionPack::Paint: logic confirmed by peer review
- fn_09453 UICashEmotionPack::SetSaleBadge: logic confirmed by peer review
- fn_09483 UICashEmotionPiece::Paint: logic confirmed by peer review
- fn_45445 CSkinMgr::CSkinMgr: logic confirmed by peer review
- fn_09681 CSkinMgr::~CSkinMgr: logic confirmed by peer review
- fn_09683 CSkinMgr::Prepare: logic confirmed by peer review
- fn_09684 SkinPaletteColor: logic confirmed by peer review
- fn_09685 SkinPaletteChannels: logic confirmed by peer review
- fn_09686 CSkinMgr::Name: logic confirmed by peer review
- fn_09687 CSkinMgr::Prefix: logic confirmed by peer review
- fn_09688 CSkinMgr::Name: logic confirmed by peer review
- fn_09690 CSkinMgr::Selected: logic confirmed by peer review
- fn_10758 UIEditCtrl::DrawSelectionAt: logic confirmed by peer review
- fn_10759 UIEditCtrl::DrawSelection: logic confirmed by peer review

Reviewed-by: ragnarok-clanker
Adds to the build: Source/Contents/SkinMgr.cpp
2026-10-28 19:13:07 +00:00

95 lines
3.5 KiB
C++

#include "Resource/Bitmap/BitmapResource.h"
#include "Resource/ResourceMgr.h"
#include "Resource/TextureNames.h"
#include "UI/Window/UIWindow.h"
// OFFSET: 0x008D2CE0
// FUNCTION: fn_12098
int UIWindow::DrawTitleBar(FontCache& fonts, const TextLocale& locale, bool closeButton, const char* title, int width) {
if (width == 0) {
width = this->geometry.width;
}
int left = 0;
int titleHeight = 0;
auto* leftBar = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\titlebar_left.bmp")));
if (leftBar) {
this->DrawBitmap(0, 0, &leftBar->image, false);
left = leftBar->image.width;
}
int right = 0;
auto* rightBar = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\titlebar_right.bmp")));
if (rightBar) {
right = rightBar->image.width;
this->DrawBitmap(width - right, 0, &rightBar->image, false);
}
auto* middle = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\titlebar_mid.bmp")));
if (middle) {
titleHeight = middle->image.height;
const int extent = width - right - left;
const int count = extent / middle->image.width + (extent % middle->image.width != 0);
for (int index = 0; index < count; ++index) {
this->DrawBitmap(left, 0, &middle->image, false);
left += middle->image.width;
}
}
this->DrawTextAt(fonts, locale, 19, titleHeight - 13, title, 0, 0, 12, 0xFFFFFF, 0, 0);
this->DrawTextAt(fonts, locale, 18, titleHeight - 14, title, 0, 0, 12, 0, 0, 0);
if (closeButton) {
auto* icon = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\sys_base_off.bmp")));
this->DrawBitmap(3, 3, icon ? &icon->image : nullptr, true);
}
return titleHeight;
}
// OFFSET: 0x008D2E50
// FUNCTION: fn_12099
int UIWindow::DrawTitleBarAt(FontCache& fonts, const TextLocale& locale, int x, int width, bool closeButton, const char* title) {
if (width <= 0) {
width = this->geometry.width - x;
}
int left = 0;
int right = 0;
int titleHeight = 0;
auto* leftBar = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\titlebar_left.bmp")));
if (leftBar) {
this->DrawBitmap(x, 0, &leftBar->image, false);
left = leftBar->image.width;
}
auto* rightBar = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\titlebar_right.bmp")));
if (rightBar) {
right = rightBar->image.width;
this->DrawBitmap(x - right + width, 0, &rightBar->image, false);
}
auto* middle = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\titlebar_mid.bmp")));
if (middle) {
titleHeight = middle->image.height;
const int extent = width - right - left;
const int count = extent / middle->image.width + (extent % middle->image.width != 0);
for (int index = 0; index < count; ++index) {
this->DrawBitmap(x + left + index * middle->image.width, 0, &middle->image, false);
}
}
this->DrawTextAt(fonts, locale, x + 19, titleHeight - 13, title, 0, 0, 12, 0xFFFFFF, 0, 0);
this->DrawTextAt(fonts, locale, x + 18, titleHeight - 14, title, 0, 0, 12, 0, 0, 0);
if (closeButton) {
auto* icon = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\sys_base_off.bmp")));
if (icon) {
this->DrawBitmap(x + 3, 3, &icon->image, true);
}
}
return titleHeight;
}