From 4e38d1a5897cd4bf29b46e1fc059a189d817b1ff Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sat, 31 Oct 2026 04:40:13 +0000 Subject: [PATCH] Decompile fn_11752 (UITalkboxTrapInputWnd::Slot15) Batch #7179 by aDw: 0 byte-identical, 1 confirmed by peer review. - fn_11752 UITalkboxTrapInputWnd::Slot15: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, alisonrag, superintelligence Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Window/UIMessageBox.cpp | 31 ++++++++++++++++++++++++ Source/UI/Window/UITalkboxTrapInputWnd.h | 3 +++ 2 files changed, 34 insertions(+) diff --git a/Source/UI/Window/UIMessageBox.cpp b/Source/UI/Window/UIMessageBox.cpp index 868bb28e1..1d60e863a 100644 --- a/Source/UI/Window/UIMessageBox.cpp +++ b/Source/UI/Window/UIMessageBox.cpp @@ -1053,6 +1053,37 @@ void UIChatRoomWnd::Move(int x, int y) { this->Slot36(); } +// OFFSET: 0x008B7040 +// FUNCTION: fn_11752 +void UITalkboxTrapInputWnd::Slot15(int, int) { + this->edit = new UIEditCtrl(*this->m_context, *this->m_editContext); + this->edit->SetSize(240, 16); + this->edit->Move(22, 50); + this->edit->maximum = 78; + this->edit->Background(242, 242, 242); + this->AddChild(this->edit); + InputFocus focus{g_windowMgr.hoverWindow}; + focus.Set(this->edit); + + const std::string prefix("유저인터페이스\\"); + const char* names[2][3] = {{"btn_ok", "btn_ok_a", "btn_ok_b"}, {"btn_cancel", "btn_cancel_a", "btn_cancel_b"}}; + int ids[2] = {184, 185}; + int positions[2][2] = {{189, 96}, {234, 96}}; + + for (int index = 0; index < 2; ++index) { + auto* button = new UIBitmapButton(*this->m_context, *this->m_controls); + button->SetBitmap((prefix + names[index][0] + ".bmp").c_str(), 0, 0); + button->SetBitmap((prefix + names[index][1] + ".bmp").c_str(), 1, 0); + button->SetBitmap((prefix + names[index][2] + ".bmp").c_str(), 2, 0); + button->SetSize(button->BitmapWidth(), button->BitmapHeight()); + button->Move(positions[index][0], positions[index][1]); + button->SetId(ids[index]); + this->AddChild(button); + } + + this->m_message0 = 184; +} + // OFFSET: 0x008B7A60 // FUNCTION: fn_11753 void UILoginOTPWnd::Slot18() { diff --git a/Source/UI/Window/UITalkboxTrapInputWnd.h b/Source/UI/Window/UITalkboxTrapInputWnd.h index 775b85c38..f96517a85 100644 --- a/Source/UI/Window/UITalkboxTrapInputWnd.h +++ b/Source/UI/Window/UITalkboxTrapInputWnd.h @@ -4,6 +4,7 @@ #include "UI/Window/UIFrameWnd.h" class UIEditCtrl; +struct UIEditContext; struct TalkboxTrapTarget { /* 0000 */ int unknown_0000; @@ -19,6 +20,7 @@ struct TalkboxTrapRequest { class UITalkboxTrapInputWnd : public UIFrameWnd { public: + void Slot15(int width, int height) override; void Paint() override; int SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) override; @@ -27,6 +29,7 @@ public: protected: UIButtonContext* m_controls; + UIEditContext* m_editContext; }; #endif