Decompile fn_12174 (UIGraffiStrboxWnd::Slot15)
Batch #6130 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_12174 UIGraffiStrboxWnd::Slot15: logic confirmed by peer review Peer-reviewed-by: alisonrag, Lumen, Snow Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). Adds to the build: Source/UI/Dialogs/UIGraffiStrboxWnd.cpp
This commit is contained in:
parent
a9d495558a
commit
bf225ef48b
3 changed files with 44 additions and 0 deletions
38
Source/UI/Dialogs/UIGraffiStrboxWnd.cpp
Normal file
38
Source/UI/Dialogs/UIGraffiStrboxWnd.cpp
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
#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->m_context, *this->m_editContext);
|
||||
this->edit->SetSize(240, 16);
|
||||
this->edit->Move(22, 50);
|
||||
this->edit->maximum = 20;
|
||||
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;
|
||||
}
|
||||
|
|
@ -4,10 +4,12 @@
|
|||
#include "UI/Window/UIFrameWnd.h"
|
||||
|
||||
struct UIButtonContext;
|
||||
struct UIEditContext;
|
||||
class UIEditCtrl;
|
||||
|
||||
class UIGraffiStrboxWnd : 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;
|
||||
|
||||
|
|
@ -17,6 +19,9 @@ protected:
|
|||
public:
|
||||
int area[4];
|
||||
UIEditCtrl* edit;
|
||||
|
||||
protected:
|
||||
UIEditContext* m_editContext;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -828,6 +828,7 @@
|
|||
"Source/UI/Cooldowns/CooldownOwner.cpp": 2,
|
||||
"Source/UI/Cooldowns/CooldownState.cpp": 2,
|
||||
"Source/UI/Dialogs/UIEditctrlWnd.cpp": 2,
|
||||
"Source/UI/Dialogs/UIGraffiStrboxWnd.cpp": 2,
|
||||
"Source/UI/Dialogs/UIWaitDBSaveWnd.cpp": 2,
|
||||
"Source/UI/Edit/EditTextState.cpp": 2,
|
||||
"Source/UI/Edit/EditViewport.cpp": 2,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue