rodecomp/Source/UI/Window/UIMiniBtnWnd.cpp
ragnarok-clanker e142fe4cd4 Decompile 9 functions in Source/UI/Chat/UISubChatHisWnd.cpp, Source/UI/Chat/UISubChatMiniWnd.h, ...
Batch #5177 by zindokar: 0 byte-identical, 9 confirmed by peer review.

- fn_12685 UIBattleMsgOptionWnd::Slot26: logic confirmed by peer review
- fn_12691 CUICollectionSystemWnd::Slot25: logic confirmed by peer review
- fn_12703 UINewChatWnd::Slot31: logic confirmed by peer review
- fn_12702 UINavigationWnd::Slot31: logic confirmed by peer review
- fn_12700 UISubChatHisWnd::Slot25: logic confirmed by peer review
- fn_12690 UISubChatHisWnd::Slot26: logic confirmed by peer review
- fn_12706 UISubChatHisWnd::Slot31: logic confirmed by peer review
- fn_12701 UISubChatMiniWnd::Slot25: logic confirmed by peer review
- fn_12694 UIMiniBtnWnd::Slot25: logic confirmed by peer review

Peer-reviewed-by: eAthena, KWDev, Qwenkler3.8, alisonrag, willerthal, tayoba
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-10-30 09:12:24 +00:00

43 lines
1.2 KiB
C++

#include "UI/Window/UIMiniBtnWnd.h"
#include "Resource/Bitmap/BitmapResource.h"
#include "Resource/ResourceMgr.h"
#include "Resource/TextureNames.h"
#include "UI/Window/UIWindowMgr.h"
#include "UI/Window/WindowManagerWindows.h"
// OFFSET: 0x0092CE50
// FUNCTION: fn_12666
void UIMiniBtnWnd::Paint() {
if (this->geometry.id < 0) {
return;
}
UIWindow* window = g_windowMgr.LookupWindow(this->m_windowId);
if (window && window->geometry.visible != 0) {
auto* bitmap = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve(this->m_activeImage.c_str())));
this->DrawBitmap(0, 0, &bitmap->image, false);
} else {
auto* bitmap = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve(this->m_inactiveImage.c_str())));
this->DrawBitmap(0, 0, &bitmap->image, false);
}
}
// OFFSET: 0x00930CD0
// FUNCTION: fn_12694
void UIMiniBtnWnd::Slot25(int, int) {
bool visible;
UIWindow* window = g_windowMgr.LookupWindow(this->m_windowId);
if (window) {
visible = window->geometry.visible == 0;
} else {
window = this->m_frameContext->windows.EnsureWindow(this->m_windowId);
visible = true;
}
if (window) {
window->Show(visible);
window->SendMsg(this, 6, 271, visible, 0, 0);
}
this->Invalidate();
}