Batch #10189 by ragnarok-clanker: forced by an admin (15 lower score(s), 71 changed function(s)); checked with 118 compiled unit(s), including every includer of Source/UI/Buttons/UINaviLinkButton.h, Source/UI/Chat/UISubChatHisWnd.h, Source/UI/Dialogs/UIChooseWarpWnd.h, Source/UI/Dialogs/UIChooseWnd.h, Source/UI/Edit/UIEditCtrl.h, Source/UI/EntryQueue/UIEntryQueueWnd.h, Source/UI/Guild/UIAgitWnd.h, Source/UI/Guild/UIGuildWnd.h, Source/UI/Items/UIItemRepairWnd.h, Source/UI/Items/UIMakeTargetListWnd.h, Source/UI/Items/UIWeaponRefineWnd.h, Source/UI/Lists/UIChatHisBox.h, Source/UI/Lists/UIComboBox.h, Source/UI/Lists/UIComboBoxEx.h, Source/UI/Lists/UIListBox.h, Source/UI/Lists/UIListBoxEx.h, Source/UI/Lists/UIListBoxNavi.h, Source/UI/Lists/UIListBoxNaviSearch.h, Source/UI/Lists/UIMemberListBox.h, Source/UI/Lists/UIPackageBoxNameList.h, Source/UI/Lists/UIReplayListBox.h, Source/UI/Navigation/UINavigationV4Wnd.h, Source/UI/Text/TextMarkup.h, Source/UI/Text/UITextViewer.h, Source/UI/UIRoundBoxTooltipWnd.h, Source/UI/Window/UIChatRoomWnd.h, Source/UI/Window/UINavigationWnd.h, Source/UI/Window/UISecondCostumeWnd.h, Source/UI/Window/UISelectReplayDataWnd.h, Source/UI/Window/UIShowWarpWnd.h.
88 lines
2.7 KiB
C++
88 lines
2.7 KiB
C++
#include "UI/Window/UIShowWarpWnd.h"
|
|
#include "UI/Buttons/UIBitmapButton.h"
|
|
#include "Client/ReplayPacketRecorder.h"
|
|
#include "Client/Session.h"
|
|
#include "Contents/MessageTable.h"
|
|
#include "UI/Lists/UIListBox.h"
|
|
#include "UI/Window/UIWindowMgr.h"
|
|
|
|
#include <algorithm>
|
|
#include <string>
|
|
|
|
// OFFSET: 0x0094CA20
|
|
// FUNCTION: fn_12899
|
|
void UIShowWarpWnd::Slot15(int width, int height) {
|
|
auto* list = new UIListBox(*this->m_context);
|
|
this->m_list = list;
|
|
width -= 0x18;
|
|
height -= 0x32;
|
|
if (width < 0x14) {
|
|
width = 0x14;
|
|
}
|
|
if (height < 0x1e) {
|
|
height = 0x1e;
|
|
}
|
|
list->Configure(0x0c, 0x14, width, height, 0);
|
|
list->backgroundRed = 0xf0;
|
|
list->backgroundGreen = 0xf0;
|
|
list->backgroundBlue = 0xf0;
|
|
list->selected = -1;
|
|
list->Invalidate();
|
|
list->transparent = 0;
|
|
this->AddChild(list);
|
|
|
|
const std::string prefix = "유저인터페이스\\";
|
|
auto* close = new UIBitmapButton(*this->m_context);
|
|
close->SetBitmap((prefix + "btn_close" + ".bmp").c_str(), 0, 0);
|
|
close->SetBitmap((prefix + "btn_close_a" + ".bmp").c_str(), 1, 0);
|
|
close->SetBitmap((prefix + "btn_close_b" + ".bmp").c_str(), 2, 0);
|
|
close->SetSize(close->BitmapWidth(), close->BitmapHeight());
|
|
close->Move(this->geometry.width - 0x2e, this->geometry.height - 0x18);
|
|
close->SetId(0xc9);
|
|
this->AddChild(close);
|
|
this->m_message0 = 0xb8;
|
|
}
|
|
|
|
// OFFSET: 0x0094ECE0
|
|
// FUNCTION: fn_12914
|
|
void UIShowWarpWnd::Paint() {
|
|
this->DrawBorder(0, 0, 0, 0);
|
|
}
|
|
|
|
// OFFSET: 0x00951210
|
|
// FUNCTION: fn_12949
|
|
int UIShowWarpWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) {
|
|
switch (message) {
|
|
case 6:
|
|
this->m_recorder->Record(this->geometry.id, static_cast<int>(argument1), argument2, argument3, argument4);
|
|
if (argument1 == 201) {
|
|
g_windowMgr.CloseWindow(0x134);
|
|
}
|
|
return 0;
|
|
case 0x12:
|
|
this->m_list->SendMsg(nullptr, 0x12, 0, 0, 0, 0);
|
|
return 0;
|
|
case 0x13:
|
|
this->m_list->SendMsg(nullptr, 0x13, 0, 0, 0, 0);
|
|
return 0;
|
|
case 0x22: {
|
|
const char* name = reinterpret_cast<const char*>(argument1);
|
|
if (std::string(name) == "Random") {
|
|
this->m_list->AddLine(LookupMessage(0xD4));
|
|
} else if (std::string(name) == "cancel") {
|
|
this->m_list->AddLine(LookupMessage(0xDA));
|
|
} else {
|
|
this->m_list->AddLine(g_session.GetMapDisplayName(g_session.GatName2RswName(name)));
|
|
}
|
|
return 0;
|
|
}
|
|
default:
|
|
return UIFrameWnd::SendMsg(sender, message, argument1, argument2, argument3, argument4);
|
|
}
|
|
}
|
|
|
|
// OFFSET: 0x009470C0
|
|
// FUNCTION: fn_12858
|
|
UIShowWarpWnd::UIShowWarpWnd(UIWindowContext& windows, WindowResponseRecorder& recorder)
|
|
: UIFrameWnd(windows, 0), m_recorder(&recorder) {
|
|
}
|