Decompile fn_13750 (UIParaResultWnd::Slot15)

Batch #7212 by eAthena: 0 byte-identical, 1 confirmed by peer review.

- fn_13750 UIParaResultWnd::Slot15: logic confirmed by peer review

Peer-reviewed-by: alisonrag, Lumen, aDw
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-31 04:57:01 +00:00
commit 5d86d0d7b9
4 changed files with 67 additions and 6 deletions

View file

@ -125,11 +125,6 @@ public:
int SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) override;
};
struct UIEditCtrl3Table {
/* 0000 */ std::vector<int> items;
/* 000C */ int count = 0;
};
class UIEditCtrl3 : public UIEditCtrl2 {
public:
UIEditCtrl3(UIWindowContext& windows, UIEditContext& edit);
@ -148,6 +143,7 @@ public:
void PlaceLinks(const std::string& value, int y, int line, int firstLine, int endLine);
std::string TakePendingText();
void SetTagColor(std::uint32_t color);
void ClearLineState();
/* 011C */ std::list<std::vector<UIItemTagButton*>> entries;
/* 0124 */ std::vector<std::string> pendingText;
@ -167,7 +163,7 @@ public:
/* 0160 */ char* unknown_0160;
/* 0164 */ char* unknown_0164;
/* 0168 */ std::vector<std::string> unknown_0168;
/* 0174 */ UIEditCtrl3Table unknown_0174;
/* 0174 */ std::vector<bool> unknown_0174;
/* 0184 */ short unknown_0184;
};

View file

@ -473,3 +473,5 @@ int UIShowAndEditTimeCtrl::SendMsg(UIWindow* sender, int message, std::intptr_t
}
return 0;
}
// OFFSET: 0x00853F20

View file

@ -9,9 +9,14 @@
#include "Contents/Configuration/ServiceConfiguration.h"
#include "Contents/Items/ItemDescription.h"
#include "Contents/Items/ItemNaming.h"
#include "Contents/MessageTable.h"
#include "Contents/PlayerNameDictionary.h"
#include "UI/Buttons/UIBitmapButton.h"
#include "UI/Dialogs/UIPasswordWnd.h"
#include "UI/Lists/UIScrollBar.h"
#include "UI/Shortcuts/ShortcutVisibility.h"
#include "UI/Text/UIStaticText.h"
#include "UI/Window/UIResizer.h"
#include "UI/Window/UIWindowMgr.h"
#include "Utility/Text/FormatString.h"
#include "Utility/Text/GroupedInteger.h"
@ -163,3 +168,52 @@ void UIParaItemShopWnd::Slot32(int x, int y) {
// FUNCTION: fn_13753
void __stdcall Nullsub344(int, int) {
}
// OFFSET: 0x009A83C0
// FUNCTION: fn_13750
void UIParaResultWnd::Slot15(int width, int height) {
this->total = new UIStaticText(*this->m_context, *this->m_controls);
this->total->SetSize(160, 15);
this->total->Move(12, this->geometry.height - 21);
this->AddChild(this->total);
this->title = new UIStaticText(*this->m_context, *this->m_controls);
this->title->SetSize(70, 15);
this->title->SetText(LookupMessage(2530), 0);
this->title->Move(16, 2);
this->title->shadow = 1;
this->AddChild(this->title);
UIResizer* resizer = new UIResizer(*this->m_context);
this->resizer = resizer;
resizer->SetSize(16, 16);
resizer->SetDirection(7);
resizer->SetBitmapName("유저인터페이스\\btn_resize.bmp");
resizer->Move(this->geometry.width - 15, this->geometry.height - 15);
resizer->SetColors(0xFFFF00FF, 0xFFFF00FF);
this->AddChild(resizer);
UIScrollBar* scrollBar = new UIScrollBar(*this->m_context);
this->scrollBar = scrollBar;
scrollBar->Configure(this->geometry.width - 15, 14, 1, this->geometry.height - this->unknown_0100 - this->unknown_00FC - 17);
this->AddChild(scrollBar);
{
const std::string prefix = "유저인터페이스\\";
const int x = this->geometry.width - 61;
const int y = this->geometry.height - 24;
UIBitmapButton* button = new UIBitmapButton(*this->m_context, *this->m_controls);
this->buttons[0] = button;
button->SetBitmap((prefix + "btn_ok.bmp").c_str(), 0, 0);
button->SetBitmap((prefix + "btn_ok_a.bmp").c_str(), 1, 0);
button->SetBitmap((prefix + "btn_ok_b.bmp").c_str(), 2, 0);
button->SetSize(button->BitmapWidth(), button->BitmapHeight());
button->Move(x, y);
button->SetId(184);
this->AddChild(button);
}
this->visibleRows = (height - this->unknown_0100 - this->unknown_00FC - 17) / 32;
this->columns = 1;
this->SendMsg(nullptr, 23, 0, 0, 0, 0);
}

View file

@ -8,6 +8,8 @@
#include <cstdint>
class UIStaticText;
class UIParaItemPurchaseWnd : public UIItemPurchaseWnd {
public:
void Slot25(int x, int y) override;
@ -23,10 +25,17 @@ public:
class UIParaResultWnd : public UIItemBaseWnd {
public:
void Slot10(int x, int y, std::intptr_t value) override;
void Slot15(int width, int height) override;
void Slot28(int x, int y) override;
void AddItem(const RawItemBasic& item, int quantity);
void AddItem(const ITEM_INFO& item);
/* 00F0 */ UIStaticText* title;
/* 00F4 */ UIStaticText* total;
/* 00F8 */ int unknown_00F8;
/* 00FC */ int unknown_00FC;
/* 0100 */ int unknown_0100;
};
#endif