rodecomp/Source/UI/Items/UIItemRepairWnd.cpp
ragnarok-clanker 1222fcd194 Decompile 3 functions in Source/UI/Items/UIMakeTargetProcessWnd.cpp, Source/UI/Items/UIMakeTargetProcessWnd.h, ...
Batch #4071 by eAthena: 0 byte-identical, 3 confirmed by peer review.

- fn_13603 UIMakeTargetProcessWnd::GetItemAt: logic confirmed by peer review
- fn_13604 UIItemRepairWnd::Slot15: logic confirmed by peer review
- fn_13578 UIMerchantItemLogWnd::Slot19: logic confirmed by peer review

Peer-reviewed-by: youko, superintelligence
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/Items/UIMakeTargetProcessWnd.cpp, Source/UI/Item/UIMerchantItemLogWnd.cpp
2026-10-30 00:46:15 +00:00

47 lines
1.7 KiB
C++

#include "UI/Items/UIItemRepairWnd.h"
#include "Contents/MessageTable.h"
#include "UI/Buttons/UIBitmapButton.h"
#include "UI/Buttons/UIButton.h"
#include "UI/Lists/UIListBox.h"
#include <string>
// OFFSET: 0x009A3860
// FUNCTION: fn_13609
void UIItemRepairWnd::Paint() {
auto& controls = *this->m_controls;
const int titleHeight = this->DrawTitleBar(controls.fonts, controls.locale, true, LookupMessage(812), 0);
this->DrawPanelBackground(titleHeight, 0, "");
this->DrawButtonBar(2, 0, 1);
}
// OFFSET: 0x009A0B00
// FUNCTION: fn_13604
void UIItemRepairWnd::Slot15(int width, int height) {
this->m_list = new UIListBox(*this->m_context, *this->m_listContext);
this->m_list->Configure(12, 22, width - 24, height - 55, 0);
this->m_list->backgroundRed = 240;
this->m_list->backgroundGreen = 240;
this->m_list->backgroundBlue = 240;
this->m_list->SetId(184);
this->AddChild(this->m_list);
const std::string prefix("유저인터페이스\\");
int positions[2][2] = {{width - 91, height - 24}, {width - 46, 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 (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);
}
this->m_message0 = 184;
}