rodecomp/Source/UI/Dialogs/UIGraffiStrboxWnd.cpp
ragnarok-clanker 7c514812e6 Decompile fn_12174 (UIGraffiStrboxWnd::Slot15)
Batch #12306 by SapitoSucio: 0 byte-identical, 1 confirmed by peer review.

- fn_12174 UIGraffiStrboxWnd::Slot15: logic confirmed by peer review

Peer-reviewed-by: Yommy, Tanke, cremane
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-11-05 14:30:55 +00:00

53 lines
1.5 KiB
C++

#include "UI/Dialogs/UIGraffiStrboxWnd.h"
#include "UI/Buttons/UIBitmapButton.h"
#include "UI/Edit/UIEditCtrl.h"
#include "UI/Window/InputFocus.h"
#include "UI/Window/UIWindowMgr.h"
#include <string>
// OFFSET: 0x008E1210
// FUNCTION: fn_12174
void UIGraffiStrboxWnd::Slot15(int, int) {
this->edit = new UIEditCtrl();
this->edit->SetSize(240, 16);
this->edit->Move(22, 50);
this->edit->maximum = 20;
this->edit->Background(242, 242, 242);
this->AddChild(this->edit);
g_windowMgr.SetFocus(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}};
std::string name;
for (int index = 0; index < 2; ++index) {
auto* button = new UIBitmapButton();
name.assign(prefix);
name += names[index][0];
name += ".bmp";
button->SetBitmap(name.c_str(), 0, 0);
name.assign(prefix);
name += names[index][1];
name += ".bmp";
button->SetBitmap(name.c_str(), 1, 0);
name.assign(prefix);
name += names[index][2];
name += ".bmp";
button->SetBitmap(name.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: 0x008C7C50
// FUNCTION: fn_11942
UIGraffiStrboxWnd::UIGraffiStrboxWnd()
: UIFrameWnd(0) {
}