rodecomp/Source/UI/Items/UIItemStoreComboBox.cpp
ragnarok-clanker 55d37a7071 Maintenance: Forced resubmit of 17189, rebased on 7ea84b3b3 (main had added 25 more copies of the same lines, now converted too). Sha
Batch #17225 by ragnarok-clanker: forced by an admin (0 lower score(s), 1 changed function(s)); checked with 75 compiled unit(s), including every includer of Source/Utility/StdIntVectorCopy.h, Source/Utility/StdStringConcat.h, Source/Utility/StdStringCopy.h, Source/Utility/StdStringInsert.h, Source/Utility/StdStringMoveAssign.h, Source/Utility/StdStringVectorDestroy.h, Source/Utility/StdTraitsEqual.h, Source/Utility/StdTraitsFind.h, Source/Utility/StdWindowListEmplace.h.
2026-11-11 15:11:07 +00:00

54 lines
1.8 KiB
C++

#include "UI/Buttons/UIBitmapButton.h"
#include "UI/Items/UIItemStoreComboBox.h"
#include "UI/Text/UIStaticText.h"
#include "UI/Window/UIWindow.h"
#include <cstdio>
#include <string>
#include "Utility/StdStringConcat.h"
// OFFSET: 0x0086D530
// FUNCTION: fn_11047
UIItemStoreComboBox::UIItemStoreComboBox()
: UIComboBoxEx(), pink(false) {
}
// OFFSET: 0x00886200
// FUNCTION: fn_11325
void UIItemStoreComboBoxWnd::OnCreate(int, int) {
std::string path = "유저인터페이스\\basic_interface\\";
const char* pressed = this->pink == 1 ? "combo_btn_pink_b" : "combo_btn_b";
const char* disabled = this->pink == 1 ? "combo_btn_pink_c" : "combo_btn_c";
this->button = new UIBitmapButton();
this->button->SetBitmap((path + "combo_btn_a" + ".bmp").c_str(), 0, 0);
this->button->SetBitmap((path + pressed + ".bmp").c_str(), 1, 0);
this->button->SetBitmap((path + disabled + ".bmp").c_str(), 2, 0);
this->button->SetSize(this->button->BitmapWidth(), this->button->BitmapHeight());
this->button->Move(this->geometry.width - this->button->BitmapWidth(), this->geometry.height - this->button->BitmapHeight());
this->button->SetId(273);
this->AddChild(this->button);
UIItemStoreComboBox* items = new UIItemStoreComboBox();
this->list = items;
items->pink = this->pink != 0;
this->list->SetSize(62, 45);
this->list->Move(0, 0);
this->list->Show(0);
this->AddChild(this->list);
char text[12] = {};
std::sprintf(text, "(NO SELECT)");
this->label = new UIStaticText();
this->label->SetSize(this->geometry.width - this->button->BitmapWidth(), this->button->BitmapHeight());
this->label->SetText(text, 0);
this->label->Move(2, 3);
this->label->shadow = 1;
this->AddChild(this->label);
}
// OFFSET: 0x0086D590
// FUNCTION: fn_11048
UIItemStoreComboBoxWnd::UIItemStoreComboBoxWnd() : UIComboBoxDefWnd(), pink(0) {
}