rodecomp/Source/UI/Buttons/UITextureButton.cpp
ragnarok-clanker 60f125b5fc Decompile 21 functions in Source/UI/Buttons/UIBmpTextButton2.h, Source/UI/Buttons/UITextureButton.h, ...
Batch #3711 by youko: 0 byte-identical, 21 confirmed by peer review.

- fn_10797 UIBitmapTab::Paint: logic confirmed by peer review
- fn_10798 UIBmpTextButton2::Paint: logic confirmed by peer review
- fn_10802 UIChatRoomTitle::Paint: logic confirmed by peer review
- fn_10804 UIColorButton::Paint: logic confirmed by peer review
- fn_10805 UIColorTransBalloonText::Paint: logic confirmed by peer review
- fn_10806 UIEditCtrl3::Paint: logic confirmed by peer review
- fn_10808 UIEditCtrl_OldList::Paint: logic confirmed by peer review
- fn_10809 UIEmblemWnd::Paint: logic confirmed by peer review
- fn_10815 UIResizer::Paint: logic confirmed by peer review
- fn_10819 UIStaticText3::Paint: logic confirmed by peer review
- fn_10821 UITab::Paint: logic confirmed by peer review
- fn_10825 UIWordDisplayWnd::Paint: logic confirmed by peer review
- fn_10832 UIMerchantShopTitle::Slot26: logic confirmed by peer review
- fn_10838 UIBitmapTab::Slot25: logic confirmed by peer review
- fn_10840 UIChatEditCtrl::Slot25: logic confirmed by peer review
- fn_10843 UIMerchantShopTitle::Slot25: logic confirmed by peer review
- fn_10851 UITab::Slot25: logic confirmed by peer review
- fn_10856 UITextureButton::Slot31: logic confirmed by peer review
- fn_10883 UIEmblemWnd::Slot19: logic confirmed by peer review
- fn_10884 UINameBalloonText::Slot19: logic confirmed by peer review
- fn_10885 UIWordDisplayWnd::Slot19: logic confirmed by peer review

Peer-reviewed-by: ragnarok-clanker, eAthena, Yommy
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-10-30 00:21:21 +00:00

56 lines
1.7 KiB
C++

#include "Client/Mode/ModeEvents.h"
#include "UI/Buttons/UITextureButton.h"
#include "UI/Window/UIWindowMgr.h"
#include "UI/Window/WindowPolicy.h"
// OFFSET: 0x0085E070
// FUNCTION: fn_10822
void UITextureButton::Paint() {
}
// OFFSET: 0x0085F060
// OFFSET: 0x03DE9CE2
// FUNCTION: fn_10856
void UITextureButton::Slot31(int x, int y) {
if (this->m_disabled == 1) {
return;
}
if (g_windowMgr.Capture() != this) {
return;
}
if (x < 0 || x >= this->geometry.width || y < 0 || y >= this->geometry.height) {
this->geometry.unknown_0030 = 0;
} else {
if (this->unknown_011C == 1) {
this->unknown_011D = this->unknown_011D == 0;
}
this->geometry.unknown_0030 = 1;
UIWindow* parent = this->parent;
if (parent) {
if (WindowPolicy(this->m_buttonContext->policy, this->m_buttonContext->restricted, 3, parent->geometry.id) > 0) {
int id = this->geometry.id;
if (id == 185 && this->m_context->mode && *this->m_buttonContext->activeModeType == 2) {
const char* text = this->m_buttonContext->services.MessageText(17);
if (this->m_buttonContext->services.Confirm(text, 2, 1, 0, "Message", 280, 120) == 187) {
this->m_context->mode->SendModeMessage(2, 0, 0, 0, 0);
}
} else {
if (id == 184 || id == 321) {
this->m_buttonContext->services.Submit(parent);
id = this->geometry.id;
}
this->parent->SendMsg(this, 6, id, this->m_argument, 0, 0);
}
}
} else {
this->m_context->mode->SendModeMessage(0, this->geometry.id, this->m_argument, 0, 0);
}
}
this->Invalidate();
g_windowMgr.ReleaseCapture();
}