rodecomp/Source/UI/Window/UINavigationWnd.cpp
ragnarok-clanker 7bd52336ad Decompile 4 functions in Source/UI/Window/UIJobListWnd.cpp, Source/UI/Window/UIJobListWnd.h, ...
Batch #5498 by Yommy: 0 byte-identical, 4 confirmed by peer review.

- fn_12781 UINavigationWnd::Slot11: logic confirmed by peer review
- fn_12782 UINewChatWnd::Slot11: logic confirmed by peer review
- fn_12789 UIMiniBtnWnd::Toggle: logic confirmed by peer review
- fn_12790 UINewChatWnd::SaveChatLogs: logic confirmed by peer review

Peer-reviewed-by: willerthal, tayoba
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-10-30 13:37:47 +00:00

37 lines
1 KiB
C++

#include "UI/Window/UINavigationWnd.h"
#include "Render/Renderer.h"
// OFFSET: 0x00931390
// FUNCTION: fn_12702
void UINavigationWnd::Slot31(int x, int y) {
if (static_cast<unsigned int>(x - 8) <= 126 && static_cast<unsigned int>(y - 39) <= 126) {
this->SendMsg(this, 6, 429, 0, 0, 0);
}
this->UIFrameWnd::Slot31(x, y);
}
// OFFSET: 0x00940E20
// FUNCTION: fn_12781
void UINavigationWnd::Slot11() {
if (this->m_saved) {
this->m_saved->width = this->geometry.width;
this->m_saved->height = this->geometry.height;
const int maxX = g_renderer->viewport.width - (this->m_saved->minimized ? 272 : 228);
if (this->geometry.x > maxX) {
this->geometry.x = maxX;
}
if (this->geometry.x < 0) {
this->geometry.x = 0;
}
this->m_saved->x = this->geometry.x;
const int maxY = g_renderer->viewport.height - 338;
if (this->geometry.y > maxY) {
this->geometry.y = maxY;
}
if (this->geometry.y < 0) {
this->geometry.y = 0;
}
this->m_saved->y = this->geometry.y;
}
}