Decompile fn_13055 (UICreateGuildWnd::Slot15)

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

- fn_13055 UICreateGuildWnd::Slot15: logic confirmed by peer review

Peer-reviewed-by: willerthal, SapitoSucio
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
ragnarok-clanker 2026-10-30 15:32:57 +00:00
commit 4d2fdad6f4
5 changed files with 61 additions and 2 deletions

View file

@ -27,6 +27,7 @@ public:
class UIListBoxAgit : public UIListBox {
public:
using UIListBox::UIListBox;
void Slot15(int width, int height) override;
void Slot25(int x, int y) override;
void Slot32(int x, int y) override;
@ -34,6 +35,7 @@ public:
class UIListBoxAgitMenu : public UIListBox {
public:
using UIListBox::UIListBox;
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;
void Slot25(int x, int y) override;

View file

@ -3,8 +3,10 @@
#include "Client/Mode/ModeMgr.h"
#include "Contents/MessageTable.h"
#include "Contents/UserData/NormalItemSlots.h"
#include "UI/Buttons/UIBitmapButton.h"
#include "UI/Buttons/UIButton.h"
#include "UI/Edit/UIEditCtrl.h"
#include "UI/Window/InputFocus.h"
#include "UI/Window/UIWindowMgr.h"
#include "UI/Window/WindowManagerWindows.h"
@ -239,3 +241,38 @@ int UIGuildTipWnd::SendMsg(UIWindow*, int message, std::intptr_t a1, std::intptr
return 0;
}
// OFFSET: 0x00958070
// FUNCTION: fn_13055
void UICreateGuildWnd::Slot15(int, int) {
this->m_nameEdit = new UIEditCtrl(*this->m_context, *this->m_editContext);
this->m_nameEdit->SetSize(124, 20);
this->m_nameEdit->Move(13, 42);
this->m_nameEdit->maximum = 23;
this->m_nameEdit->Background(230, 230, 230);
this->AddChild(this->m_nameEdit);
{
const std::string prefix("유저인터페이스\\");
int positions[2][2] = {{this->geometry.width - 92, this->geometry.height - 24}, {this->geometry.width - 46, this->geometry.height - 24}};
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};
for (unsigned int i = 0; i < 2; ++i) {
auto* button = new UIBitmapButton(*this->m_context, *this->m_controls);
button->SetBitmap((prefix + names[i][0] + ".bmp").c_str(), 0, 0);
button->SetBitmap((prefix + names[i][1] + ".bmp").c_str(), 1, 0);
button->SetBitmap((prefix + names[i][2] + ".bmp").c_str(), 2, 0);
button->SetSize(button->BitmapWidth(), button->BitmapHeight());
button->Move(positions[i][0], positions[i][1]);
button->SetId(ids[i]);
this->AddChild(button);
}
}
InputFocus focus{g_windowMgr.hoverWindow};
focus.Set(this->m_nameEdit);
this->m_message0 = 184;
}
// OFFSET: 0x00958990

View file

@ -4,7 +4,9 @@
#include "UI/Window/UIFrameWnd.h"
struct UIButtonContext;
struct UIEditContext;
struct GuildHelperWndInfo;
class UIBitmapButton;
class UIEditCtrl;
struct GuildBanTarget {
@ -16,6 +18,7 @@ struct GuildBanTarget {
class UIGuildHelperWnd : public UIFrameWnd {
public:
void Slot11() override;
void Slot15(int width, int height) override;
void Paint() override;
void Slot25(int x, int y) override;
void Slot27(int x, int y) override;
@ -24,13 +27,14 @@ public:
protected:
UIButtonContext* m_controls;
/* 00B4 */ int unknown_00B4;
/* 00B4 */ UIBitmapButton* m_button;
/* 00B8 */ GuildHelperWndInfo* m_saved;
};
class UICreateGuildWnd : public UIGuildHelperWnd {
public:
void Slot11() override;
void Slot15(int width, int height) override;
void Paint() override;
void Slot25(int x, int y) override;
void Slot27(int x, int y) override;
@ -40,6 +44,7 @@ public:
protected:
/* 00BC */ UIEditCtrl* m_nameEdit;
/* 00C0 */ int m_mode;
UIEditContext* m_editContext;
};
class UIGuildTipWnd : public UIFrameWnd {

View file

@ -9,6 +9,7 @@
#include "Resource/ResourceMgr.h"
#include "Resource/SkinPalette.h"
#include "Script/LuaScript.h"
#include "UI/Buttons/UIBitmapButton.h"
#include "UI/Buttons/UIButton.h"
#include "UI/Edit/UIEditCtrl.h"
#include "UI/Guild/UIAgitWnd.h"
@ -26,6 +27,9 @@
#include <cwchar>
#include <string>
// GLOBAL: gl_24999
int g_guildMemberColumnWidths[6] = {98, 65, 53, 39, 39, 76};
// GLOBAL: gl_24918
int g_guildPositionRowHeight = 19;
@ -871,6 +875,10 @@ void UIGuildTotalInfoWnd::Slot15(int, int) {
this->UpdateScroll();
}
// OFFSET: 0x00958740
// OFFSET: 0x00958FF0
// OFFSET: 0x00957DA0
// FUNCTION: fn_13051
void UIGuildInfoManageWnd::HideAgitMenu() {

View file

@ -10,12 +10,14 @@
#include <map>
#include <string>
class UIBitmapButton;
class UIButton;
class UIListBoxAgit;
class UIListBoxAgitMenu;
class UIScrollBar;
class UIStaticText;
struct UIButtonContext;
struct UIListBoxContext;
struct GuildWndInfo;
bool CompareWideText(const char* left, const char* right);
@ -50,6 +52,7 @@ protected:
class UIGuildBanishedMemberWnd : public UIGuildWnd {
public:
int Tab() override;
void Slot15(int width, int height) override;
void Slot25(int x, int y) override;
void Slot35(int delta) override;
int SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) override;
@ -69,6 +72,7 @@ protected:
class UIGuildInfoManageWnd : public UIGuildWnd {
public:
int Tab() override;
void Slot15(int width, int height) override;
void Slot19() override;
void Slot25(int x, int y) override;
void Slot32(int x, int y) override;
@ -78,12 +82,15 @@ protected:
void RefreshAgitList();
void HideAgitMenu();
/* 00D0 */ unsigned char unknown_00D0[0x24];
/* 00D0 */ UIBitmapButton* m_editButton;
/* 00D4 */ UIBitmapButton* m_disbandButton;
/* 00D8 */ unsigned char unknown_00D8[0x1C];
/* 00F4 */ std::uint32_t m_guildId;
/* 00F8 */ int m_allyRow;
/* 00FC */ int m_hostileRow;
/* 0100 */ UIListBoxAgit* m_agitList;
/* 0104 */ UIListBoxAgitMenu* m_agitMenu;
UIListBoxContext* m_listContext;
};
class UIGuildMemberManageWnd : public UIGuildWnd {