Decompile fn_12631 (UINewChatWnd::Move)

Batch #1390 by Yommy: 0 byte-identical, 1 confirmed by peer review.

- fn_12631 UINewChatWnd::Move: logic confirmed by peer review

Reviewed-by: ragnarok-clanker
This commit is contained in:
ragnarok-clanker 2026-10-28 12:12:31 +00:00
commit b684478589
2 changed files with 36 additions and 0 deletions

View file

@ -0,0 +1,19 @@
#ifndef RAGNAROK_SOURCE_UI_CHAT_UINEWCHATWND_H
#define RAGNAROK_SOURCE_UI_CHAT_UINEWCHATWND_H
#include "UI/Window/UIFrameWnd.h"
class UINewChatWnd : public UIFrameWnd {
public:
void Move(int x, int y) override;
private:
/* 00BC */ int unknown_00BC;
/* 00C0 */ int unknown_00C0;
/* 00C4 */ int m_inputX;
/* 00C8 */ int m_inputY;
/* 00CC */ unsigned char unknown_00CC[0x50];
/* 011C */ int m_inputOffsetY;
};
#endif

View file

@ -14,11 +14,13 @@
#include "UI/Shortcuts/ShortcutUse.h"
#include "UI/Shortcuts/ShortcutVisibility.h"
#include "UI/Shortcuts/UIShortCutWnd.h"
#include "UI/Chat/UINewChatWnd.h"
#include "UI/Buttons/UIBitmapButton.h"
#include "UI/Buttons/UIButton.h"
#include "UI/Buttons/UICheckBox.h"
#include "UI/Layout/WindowSnapping.h"
#include "UI/Window/UIWindow.h"
#include "UI/Window/UIWindowMgr.h"
#include <stdio.h>
#include <cstdlib>
@ -413,3 +415,18 @@ int UIShortCutWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::
return this->UIFrameWnd::SendMsg(sender, message, a, b, c, d);
}
}
// OFFSET: 0x0091E9C0
// FUNCTION: fn_12631
void UINewChatWnd::Move(int x, int y) {
this->UIFrameWnd::Move(x, y);
int screenX = 0;
int screenY = 0;
this->ToScreen(screenX, screenY);
this->m_inputX = screenX + 3;
this->m_inputY = this->m_inputOffsetY + screenY;
if (UIWindow* window = reinterpret_cast<UIWindow*>(g_windowMgr.unknown_03F0)) {
window->SendMsg(this, 6, 197, this->geometry.x + x, this->geometry.y + y, 0);
}
}