Batch #10284 by ragnarok-clanker: forced by an admin (109 lower score(s), 2846 changed function(s)); checked with 403 compiled unit(s), including every includer of Source/Contents/SignBoard/SignBoard.h, Source/UI/Acceptance/UIJoinPartyAcceptWnd.h, Source/UI/AdventureGuide/UIAdventureGuide.h, Source/UI/Buttons/UIBasicButton.h, Source/UI/Buttons/UIBitmapButton.h, Source/UI/Buttons/UIBmpRadioBtn.h, Source/UI/Buttons/UIBmpTextButton.h, Source/UI/Buttons/UIButton.h, Source/UI/Buttons/UICheckBox.h, Source/UI/Buttons/UIItemTagButton.h, Source/UI/Buttons/UIJobSlotButton.h, Source/UI/Buttons/UINaviLinkButton.h, Source/UI/Buttons/UIRadioBtn.h, Source/UI/Buttons/UITextButton.h, Source/UI/Buttons/UITextureButton.h, Source/UI/CashShop/UICashShopWnd.h, Source/UI/Chat/UIChatRoomTitle.h, Source/UI/Chat/UINewChatWnd.h, Source/UI/Chat/UISubChatHisWnd.h, Source/UI/Chat/UIWhisperWnd.h, Source/UI/Clan/UIClanWnd.h, Source/UI/Dialogs/UIChooseWarpWnd.h, Source/UI/Dialogs/UIChooseWnd.h, Source/UI/Dialogs/UIDisconnectedServerMsgWnd.h, Source/UI/Dialogs/UIEditctrlWnd.h, Source/UI/Dialogs/UIEmailAddressWnd.h, Source/UI/Dialogs/UIGraffiStrboxWnd.h, Source/UI/Dialogs/UIMemorialDunWnd.h, Source/UI/Dialogs/UIMenuWnd.h, Source/UI/Dialogs/UIMiniMapWnd.h, Source/UI/Dialogs/UIMinimapZoomWnd.h, Source/UI/Dialogs/UINoticeConfirmWnd.h, Source/UI/Dialogs/UINotifyLevelUpWnd.h, Source/UI/Dialogs/UINotifyQuestWnd.h, Source/UI/Dialogs/UINpcEditDialogWnd.h, Source/UI/Dialogs/UIPasswordWnd.h, Source/UI/Dialogs/UIProhibitListWnd.h, Source/UI/Dialogs/UIQuitWnd.h, Source/UI/Dialogs/UIRestartWnd.h, Source/UI/Dialogs/UISelectCartWnd.h, Source/UI/Dialogs/UITipOfTheDayWnd.h, Source/UI/Dialogs/UITipboxWnd.h, Source/UI/Dialogs/UIWaitWnd.h, Source/UI/Edit/UICandidateWnd.h, Source/UI/Edit/UIEditCtrl.h, Source/UI/EntryQueue/UIEntryQueueWnd.h, Source/UI/GameSettings/GameSettingsUI.h, Source/UI/Gauges/UIPcGage.h, Source/UI/Guild/UIAgitWnd.h, Source/UI/Guild/UIGuildHelperWnd.h, Source/UI/Guild/UIGuildWnd.h, Source/UI/Guild/UIGuild_Storage_Log.h, Source/UI/Item/UIItemBaseWnd.h, Source/UI/Item/UIItemStoreSubWnd.h, Source/UI/Item/UIParaItemShopWnd.h, Source/UI/Items/MergeItemWnd.h, Source/UI/Items/UICardItemIllustWnd.h, Source/UI/Items/UIIllustWnd.h, Source/UI/Items/UIItemParamChangeDisplayWnd.h, Source/UI/Items/UIItemRepairWnd.h, Source/UI/Items/UIMakeTargetListWnd.h, Source/UI/Items/UIMakeTargetProcessWnd.h, Source/UI/Items/UIMakeTargetResultWnd.h, Source/UI/Items/UISpellListWnd.h, Source/UI/Items/UISwapEquipmentWnd.h, Source/UI/Items/UIWeaponRefineWnd.h, Source/UI/Lists/UIChatHisBox.h, Source/UI/Lists/UIComboBox.h, Source/UI/Lists/UIComboBoxDefWnd.h, Source/UI/Lists/UIComboBoxEx.h, Source/UI/Lists/UIDropDownBox.h, Source/UI/Lists/UIImgMenu.h, Source/UI/Lists/UIListBox.h, Source/UI/Lists/UIListBoxEx.h, Source/UI/Lists/UIListBoxID.h, Source/UI/Lists/UIListBoxTemplate.h, Source/UI/Lists/UIMemberListBox.h, Source/UI/Lists/UITabControl.h, Source/UI/Lists/UIThumb.h, Source/UI/Lists/UITreeView.h, Source/UI/Lists/UIVScrollBar.h, Source/UI/Navigation/UINavigationV4Wnd.h, Source/UI/Party/UIAdvenPartyBoardWnd.h, Source/UI/Party/UIApplyForPartyWnd.h, Source/UI/Party/UIPartyInfoWnd.h, Source/UI/Party/UIPartySettingWnd.h, Source/UI/Party/UIRegisterPartyWnd.h, Source/UI/Party/UIRequestJoinPartyWnd.h, Source/UI/Quest/UIOngoingQuestInfo.h, Source/UI/Quest/UIQuestDisplay.h, Source/UI/Quest/UIRenewQuestUI.h, Source/UI/Quest/UIRenewQuestWnd.h, Source/UI/Rodex/UIRodexComposeWnd.h, Source/UI/Shop/UIMerchantItemPurchaseMSGWnd.h, Source/UI/Shop/UIMerchantShopMakeWnd.h, Source/UI/Shop/UIMerchantShopTitle.h, Source/UI/Shop/UINoticeMessageBox_LockSellItem.h, Source/UI/Shortcuts/UIQuickSlotWnd.h, Source/UI/Shortcuts/UIShortCutWnd.h, Source/UI/Skill/UISkillListWnd.h, Source/UI/Skill/UISkillNameChangeWnd.h, Source/UI/Status/UIStatusWnd.h, Source/UI/StylingShop/UIStylingShopWnd.h, Source/UI/Text/UIAchWnd.h, Source/UI/Text/UIBalloonText.h, Source/UI/Text/UIStaticText.h, Source/UI/Text/UIStaticTextControl.h, Source/UI/Text/UITextViewer.h, Source/UI/Text/UITransBalloonText.h, Source/UI/UIBarGraph.h, Source/UI/UIBasicCtrl.h, Source/UI/UIBroadcastBalloon.h, Source/UI/UICaptchaPreviewWnd.h, Source/UI/UICaptchaRegisterWnd.h, Source/UI/UIChangeMaterialWnd.h, Source/UI/UICheckAttendanceWnd.h, Source/UI/UIGradeEnchantWnd.h, Source/UI/UIHotkeyGuideWnd.h, Source/UI/UIItemReformWnd.h, Source/UI/UILapineScrollBar.h, Source/UI/UILapineUpgradeBoxWnd.h, Source/UI/UIMacroBlackListCheckWnd.h, Source/UI/UIMacroDetectorWnd.h, Source/UI/UIMacroUserInfoWnd.h, Source/UI/UIPreviewEquipWnd.h, Source/UI/UIRefiningWnd.h, Source/UI/UIReputeWnd.h, Source/UI/UIRoundBoxTooltipWnd.h, Source/UI/UIScrollWnd.h, Source/UI/UIStaticBitmap.h, Source/UI/UIStaticItem.h, Source/UI/Window/UIAccountLimitedToolWnd.h, Source/UI/Window/UIBalloonOpenBtn.h, Source/UI/Window/UIBank_NewWnd.h, Source/UI/Window/UIBasicInfoWnd.h, Source/UI/Window/UIBattleMsgOptionWnd.h, Source/UI/Window/UIChangeNameWnd.h, Source/UI/Window/UIChatRoomWnd.h, Source/UI/Window/UICntWnd.h, Source/UI/Window/UIControl.h, Source/UI/Window/UIDebuffRemoveWnd.h, Source/UI/Window/UIEscOptionWnd.h, Source/UI/Window/UIFrameWnd.h, Source/UI/Window/UIHomunInfoWnd.h, Source/UI/Window/UIJobListWnd.h, Source/UI/Window/UILoginOTPWnd.h, Source/UI/Window/UIMakeCharWnd.h, Source/UI/Window/UIMerInfoWnd.h, Source/UI/Window/UIMessageBox.h, Source/UI/Window/UIMileageWnd.h, Source/UI/Window/UIMonsterDisplayWnd.h, Source/UI/Window/UIMonsterInfoWnd.h, Source/UI/Window/UINavigationHelpWnd.h, Source/UI/Window/UINavigationWnd.h, Source/UI/Window/UINewMakeCharWnd.h, Source/UI/Window/UINewSelectCharWnd.h, Source/UI/Window/UINewSkillListWnd.h, Source/UI/Window/UINormalMB.h, Source/UI/Window/UINoteWnd.h, Source/UI/Window/UINoticeWnd.h, Source/UI/Window/UIOpenMailBoxWnd.h, Source/UI/Window/UIOpenRoulletteWnd.h, Source/UI/Window/UIPartyBookingHelpWnd.h, Source/UI/Window/UIPayConfirmWnd.h, Source/UI/Window/UIPetEvolutionWnd.h, Source/UI/Window/UIPetInfoWnd.h, Source/UI/Window/UIRebirthWnd.h, Source/UI/Window/UIReplayControlWnd.h, Source/UI/Window/UIReplayRECControlWnd.h, Source/UI/Window/UIRodexContentsWnd.h, Source/UI/Window/UIRoulletteWnd.h, Source/UI/Window/UISecondCostumeWnd.h, Source/UI/Window/UISeekPartyListWnd.h, Source/UI/Window/UISeekPartyMBWnd.h, Source/UI/Window/UISeekPartyWnd.h, Source/UI/Window/UISelectReplayDataWnd.h, Source/UI/Window/UISelectServerWnd.h, Source/UI/Window/UISerachStoreInfoWnd.h, Source/UI/Window/UIShowWarpWnd.h, Source/UI/Window/UITalkboxTrapInputWnd.h, Source/UI/Window/UITransMenuWnd.h, Source/UI/Window/UIViewCameraInfoWnd.h, Source/UI/Window/UIWindow.h.
428 lines
14 KiB
C++
428 lines
14 KiB
C++
#include "UI/Window/UISeekPartyMBWnd.h"
|
|
#include "Client/Session.h"
|
|
#include "Contents/MessageTable.h"
|
|
#include "Contents/UserData/NormalItemSlots.h"
|
|
#include "Network/Connection/Connection.h"
|
|
#include "Network/Packets/PacketId.h"
|
|
#include "Network/Packets/PacketLengths.h"
|
|
#include "Script/LuaScript.h"
|
|
#include "UI/Buttons/UIBitmapButton.h"
|
|
#include "UI/Buttons/UICheckBox.h"
|
|
#include "UI/Edit/UIEditCtrl.h"
|
|
#include "UI/Lists/UIComboBoxDefWnd.h"
|
|
#include "UI/Text/UIStaticText.h"
|
|
#include "UI/Window/UISeekPartyWnd.h"
|
|
#include "UI/Window/UIWindowMgr.h"
|
|
#include "UI/Window/WindowManagerWindows.h"
|
|
#include "Utility/Text/FormatString.h"
|
|
|
|
#include <cstdio>
|
|
#include <cstdlib>
|
|
#include <cstring>
|
|
|
|
namespace {
|
|
#pragma pack(push, 1)
|
|
struct PACKET_CZ_PARTY_BOOKING_REQ_REGISTER {
|
|
/* 0000 */ short packetType;
|
|
/* 0002 */ PARTY_BOOKING_DETAIL detail;
|
|
};
|
|
#pragma pack(pop)
|
|
}
|
|
|
|
// OFFSET: 0x00939EE0
|
|
// FUNCTION: fn_12756
|
|
int UISeekPartyMBWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) {
|
|
|
|
switch (message) {
|
|
case 6:
|
|
switch (a) {
|
|
case 184: {
|
|
for (int i = 0; i < 6; ++i) {
|
|
this->m_registration.detail.job[i] = -1;
|
|
}
|
|
|
|
int count = 0;
|
|
for (int category = 0; category < 8; ++category) {
|
|
std::map<unsigned short, UICheckBox*>& checks = this->m_jobChecks[category];
|
|
for (auto it = checks.begin(); it != checks.end(); ++it) {
|
|
if (it->second->geometry.unknown_0030) {
|
|
if (count < 6) {
|
|
this->m_registration.detail.job[count] = it->first;
|
|
}
|
|
++count;
|
|
}
|
|
}
|
|
}
|
|
|
|
if (count == 0) {
|
|
g_windowMgr.Confirm(LookupMessage(1768), 0, true, false, 0, "Message", 280, 120, 0);
|
|
break;
|
|
}
|
|
|
|
if (count > 6) {
|
|
char text[100];
|
|
std::memset(text, 0, sizeof(text));
|
|
std::sprintf(text, LookupMessage(1769), count);
|
|
g_windowMgr.Confirm(text, 0, true, false, 0, "Message", 280, 120, 0);
|
|
break;
|
|
}
|
|
|
|
std::string level(this->m_levelEdit->Text());
|
|
for (unsigned int i = 0; i < level.size(); ++i) {
|
|
if (level[i] < '/' || level[i] > '9') {
|
|
g_windowMgr.Confirm(LookupMessage(1770), 0, true, false, 0, "Message", 280, 120, 0);
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
this->m_registration.detail.level = static_cast<short>(std::atoi(this->m_levelEdit->Text()));
|
|
g_partyBookingLevelLimit = this->m_registration.detail.level;
|
|
const int maximum = g_partyBookingLevelMax;
|
|
if (this->m_registration.detail.level >= 1 && this->m_registration.detail.level <= maximum) {
|
|
this->m_registration.detail.mapId = static_cast<short>((this->m_type + 1) * 256 | this->m_subType);
|
|
if (!g_windowMgr.CloseWindow(164)) {
|
|
PACKET_CZ_PARTY_BOOKING_REQ_REGISTER packet;
|
|
packet.packetType = ID_CZ_PARTY_BOOKING_REQ_REGISTER;
|
|
packet.detail = this->m_registration.detail;
|
|
GetRagConnection().Send(g_packetLengths.FixedLength(packet.packetType), &packet);
|
|
}
|
|
} else {
|
|
char text[260];
|
|
std::memset(text, 0, sizeof(text));
|
|
StringFormat(text, sizeof(text), static_cast<std::size_t>(-1), LookupMessage(2601), maximum);
|
|
g_windowMgr.Confirm(text, 0, true, false, 0, "Message", 280, 120, 0);
|
|
}
|
|
break;
|
|
}
|
|
case 185:
|
|
case 201:
|
|
g_windowMgr.CloseWindow(168);
|
|
g_windowMgr.CloseWindow(170);
|
|
break;
|
|
case 202:
|
|
if (this->m_minimized) {
|
|
this->Resize(this->geometry.width, this->m_restoreHeight);
|
|
} else {
|
|
this->m_restoreHeight = this->geometry.height;
|
|
this->Resize(this->geometry.width, 17);
|
|
}
|
|
|
|
this->m_minimized = !this->m_minimized;
|
|
this->Invalidate();
|
|
break;
|
|
}
|
|
break;
|
|
case 34:
|
|
this->m_saved = reinterpret_cast<SeekPartyMBWndInfo*>(a);
|
|
if (!this->m_saved->IsValid()) {
|
|
this->m_saved->Reset();
|
|
}
|
|
|
|
this->Move(this->m_saved->x, this->m_saved->y);
|
|
this->SendMsg(nullptr, 14, 3, this->m_saved->width, this->m_saved->height, 0);
|
|
this->SendMsg(nullptr, 23, 0, 0, 0, 0);
|
|
break;
|
|
case 39:
|
|
if (sender == this->m_typeCombo) {
|
|
const int key = a + 2;
|
|
this->m_subTypeCombo->Clear();
|
|
auto found = this->m_subTypes.find(key);
|
|
if (found != this->m_subTypes.end()) {
|
|
const std::vector<std::pair<std::string, int>> entries = found->second;
|
|
for (auto it = entries.begin(); it != entries.end(); ++it) {
|
|
const std::pair<std::string, int> entry = *it;
|
|
this->m_subTypeCombo->AddOption(entry.first.c_str(), entry.second);
|
|
}
|
|
}
|
|
|
|
this->m_type = static_cast<short>(a);
|
|
this->m_subTypeCombo->Select(0);
|
|
this->m_subType = 0;
|
|
} else if (sender == this->m_subTypeCombo) {
|
|
this->m_subType = static_cast<short>(a);
|
|
} else if (sender == this->m_jobCategoryCombo) {
|
|
this->ShowJobCategory(a);
|
|
}
|
|
break;
|
|
default:
|
|
return UIFrameWnd::SendMsg(sender, message, a, b, c, d);
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
// OFFSET: 0x00944370
|
|
// FUNCTION: fn_12831
|
|
void UISeekPartyMBWnd::CreateJobChecks() {
|
|
int counts[8] = {4, 6, 13, 6, 7, 6, 13, 8};
|
|
int message = 0;
|
|
int starts[8] = {1, 5, 11, 24, 30, 37, 43, 56};
|
|
|
|
for (int i = 0; i < counts[0]; ++i) {
|
|
UICheckBox* check = new UICheckBox();
|
|
check->SetSize(110, 12);
|
|
const int job = i + 1;
|
|
check->SetImages("유저인터페이스\\checkbox_1.bmp", "유저인터페이스\\checkbox_0.bmp", LookupMessage(0x6AF + job));
|
|
if (i < 8) {
|
|
check->Move(54, 99 + i * 25);
|
|
} else {
|
|
check->Move(180, 99 + (i - 8) * 25);
|
|
}
|
|
check->SetChecked(0);
|
|
check->SetHidden(true);
|
|
check->m_disabled = 1;
|
|
this->AddChild(check);
|
|
this->m_jobChecks[0].emplace(static_cast<unsigned short>(job), check);
|
|
}
|
|
|
|
for (int category = 1; category < 8; ++category) {
|
|
for (int i = 0; i < counts[category]; ++i) {
|
|
UICheckBox* check = new UICheckBox();
|
|
check->SetSize(110, 12);
|
|
check->SetImages("유저인터페이스\\checkbox_1.bmp", "유저인터페이스\\checkbox_0.bmp", LookupMessage(0x65D + message));
|
|
if (i < 8) {
|
|
check->Move(54, 99 + i * 25);
|
|
} else {
|
|
check->Move(180, 99 + (i - 8) * 25);
|
|
}
|
|
check->SetChecked(0);
|
|
check->SetHidden(true);
|
|
check->m_disabled = 1;
|
|
this->AddChild(check);
|
|
this->m_jobChecks[category].emplace(static_cast<unsigned short>(starts[category] + i), check);
|
|
++message;
|
|
}
|
|
}
|
|
|
|
this->ShowJobCategory(0);
|
|
}
|
|
|
|
// OFFSET: 0x009447D0
|
|
// FUNCTION: fn_12832
|
|
void UISeekPartyMBWnd::InitJobCategoryCombo() {
|
|
this->m_jobCategoryCombo->AddOption(LookupMessage(0x6DB), 0);
|
|
this->m_jobCategoryCombo->AddOption(LookupMessage(0x6DC), 0);
|
|
this->m_jobCategoryCombo->AddOption(LookupMessage(0x6DD), 0);
|
|
this->m_jobCategoryCombo->AddOption(LookupMessage(0x6DE), 0);
|
|
this->m_jobCategoryCombo->AddOption(LookupMessage(0x6DF), 0);
|
|
this->m_jobCategoryCombo->AddOption(LookupMessage(0x6E0), 0);
|
|
this->m_jobCategoryCombo->AddOption(LookupMessage(0x6E1), 0);
|
|
this->m_jobCategoryCombo->AddOption(LookupMessage(0x6E2), 0);
|
|
this->m_jobCategoryCombo->Select(0);
|
|
}
|
|
|
|
// OFFSET: 0x00946150
|
|
// FUNCTION: fn_12838
|
|
void UISeekPartyMBWnd::ShowJobCategory(int category) {
|
|
if (category == this->m_jobCategory) {
|
|
return;
|
|
}
|
|
|
|
if (this->m_jobCategory != -1) {
|
|
for (int i = 0; i < 8; ++i) {
|
|
std::map<unsigned short, UICheckBox*>& checks = this->m_jobChecks[i];
|
|
auto it = checks.begin();
|
|
if (it == checks.end()) {
|
|
return;
|
|
}
|
|
|
|
for (; it != checks.end(); ++it) {
|
|
UICheckBox* check = it->second;
|
|
check->SetHidden(true);
|
|
check->m_disabled = 1;
|
|
}
|
|
}
|
|
}
|
|
|
|
std::map<unsigned short, UICheckBox*>& checks = this->m_jobChecks[category];
|
|
auto it = checks.begin();
|
|
if (it == checks.end()) {
|
|
return;
|
|
}
|
|
|
|
for (; it != checks.end(); ++it) {
|
|
UICheckBox* check = it->second;
|
|
check->SetHidden(false);
|
|
check->m_disabled = 0;
|
|
}
|
|
|
|
this->m_jobCategory = category;
|
|
this->Invalidate();
|
|
}
|
|
|
|
// OFFSET: 0x00911EE0
|
|
// FUNCTION: fn_12524
|
|
UISeekPartyMBWnd::UISeekPartyMBWnd()
|
|
: UIFrameWnd(0), m_titleText(nullptr), m_levelText(nullptr), unknown_00BC(nullptr), unknown_00C0(nullptr), m_levelEdit(nullptr), m_typeCombo(nullptr), m_subTypeCombo(nullptr), m_jobCategoryCombo(nullptr),
|
|
m_jobChecks(), m_subTypes(), unknown_0154(nullptr), unknown_0158(nullptr), m_jobCategory(-1), m_subType(0), m_restoreHeight(0), m_minimized(0) {
|
|
}
|
|
|
|
// OFFSET: 0x009146D0
|
|
// FUNCTION: fn_12542
|
|
UISeekPartyMBWnd::~UISeekPartyMBWnd() = default;
|
|
|
|
// OFFSET: 0x009273B0
|
|
// FUNCTION: fn_12650
|
|
void UISeekPartyMBWnd::Slot15(int width, int height) {
|
|
char title[64];
|
|
std::memset(title, 0, sizeof(title));
|
|
std::sprintf(title, LookupMessage(0x698));
|
|
|
|
this->m_titleText = new UIStaticText();
|
|
this->m_titleText->SetSize(this->geometry.width - 0x20, 0xF);
|
|
this->m_titleText->SetTextFitted(title);
|
|
this->m_titleText->Move(0x10, 2);
|
|
this->m_titleText->shadow = 1;
|
|
this->AddChild(this->m_titleText);
|
|
|
|
this->AddCloseButton("", 0);
|
|
this->AddMinimizeButton("", 0);
|
|
|
|
std::string label;
|
|
label = "LEVEL";
|
|
this->m_levelText = new UIStaticText();
|
|
this->m_levelText->SetSize(this->geometry.width - 10, 0x1E);
|
|
this->m_levelText->SetText(label.c_str(), 1);
|
|
this->m_levelText->Move(10, 0x17);
|
|
this->m_levelText->shadow = 1;
|
|
this->AddChild(this->m_levelText);
|
|
|
|
label = "MAP";
|
|
this->unknown_00BC = new UIStaticText();
|
|
this->unknown_00BC->SetSize(this->geometry.width - 10, 0x1E);
|
|
this->unknown_00BC->SetText(label.c_str(), 1);
|
|
this->unknown_00BC->Move(10, 0x2D);
|
|
this->unknown_00BC->shadow = 1;
|
|
this->AddChild(this->unknown_00BC);
|
|
|
|
label = "JOB";
|
|
this->unknown_00C0 = new UIStaticText();
|
|
this->unknown_00C0->SetSize(this->geometry.width - 10, 0x1E);
|
|
this->unknown_00C0->SetText(label.c_str(), 1);
|
|
this->unknown_00C0->Move(10, 0x46);
|
|
this->unknown_00C0->shadow = 1;
|
|
this->AddChild(this->unknown_00C0);
|
|
|
|
{
|
|
std::string path = "유저인터페이스\\";
|
|
this->unknown_0158 = new UIBitmapButton();
|
|
this->unknown_0158->SetBitmap((path + "btn_ok" + ".bmp").c_str(), 0, 0);
|
|
this->unknown_0158->SetBitmap((path + "btn_ok_a" + ".bmp").c_str(), 1, 0);
|
|
this->unknown_0158->SetBitmap((path + "btn_ok_b" + ".bmp").c_str(), 2, 0);
|
|
this->unknown_0158->SetSize(this->unknown_0158->BitmapWidth(), this->unknown_0158->BitmapHeight());
|
|
this->unknown_0158->Move(this->geometry.width - 0x5D, this->geometry.height - 0x18);
|
|
this->unknown_0158->SetId(0xB8);
|
|
this->AddChild(this->unknown_0158);
|
|
}
|
|
|
|
{
|
|
std::string path = "유저인터페이스\\";
|
|
this->unknown_0154 = new UIBitmapButton();
|
|
this->unknown_0154->SetBitmap((path + "btn_cancel" + ".bmp").c_str(), 0, 0);
|
|
this->unknown_0154->SetBitmap((path + "btn_cancel_a" + ".bmp").c_str(), 1, 0);
|
|
this->unknown_0154->SetBitmap((path + "btn_cancel_b" + ".bmp").c_str(), 2, 0);
|
|
this->unknown_0154->SetSize(this->unknown_0154->BitmapWidth(), this->unknown_0154->BitmapHeight());
|
|
this->unknown_0154->Move(this->geometry.width - 0x2E, this->geometry.height - 0x18);
|
|
this->unknown_0154->SetId(0xB9);
|
|
this->AddChild(this->unknown_0154);
|
|
}
|
|
|
|
this->CreateJobChecks();
|
|
|
|
this->m_levelEdit = new UIEditCtrl();
|
|
this->m_levelEdit->SetSize(0x28, 0x10);
|
|
this->m_levelEdit->Move(0x32, 0x14);
|
|
this->m_levelEdit->maximum = 5;
|
|
this->m_levelEdit->Background(0xE8, 0xE8, 0xE8);
|
|
this->m_levelEdit->Border(0x64, 0x64, 0x64);
|
|
this->m_levelEdit->flat = 0;
|
|
UIEditCtrl* edit = this->m_levelEdit;
|
|
if (const char* tooltip = LookupMessage(0x79D)) {
|
|
edit->tooltip = tooltip;
|
|
}
|
|
this->AddChild(this->m_levelEdit);
|
|
|
|
this->m_jobCategoryCombo = new UIComboBoxDefWnd();
|
|
this->m_jobCategoryCombo->dropdownHeight = 0x50;
|
|
this->m_jobCategoryCombo->SetSize(0x96, 0x12);
|
|
this->m_jobCategoryCombo->Move(0x32, 0x44);
|
|
this->m_jobCategoryCombo->borderRed = 0x64;
|
|
this->m_jobCategoryCombo->borderGreen = 0x64;
|
|
this->m_jobCategoryCombo->borderBlue = 0x64;
|
|
this->m_jobCategoryCombo->red = 0xE8;
|
|
this->m_jobCategoryCombo->green = 0xE8;
|
|
this->m_jobCategoryCombo->blue = 0xE8;
|
|
this->AddChild(this->m_jobCategoryCombo);
|
|
|
|
this->m_typeCombo = new UIComboBoxDefWnd();
|
|
this->m_typeCombo->dropdownHeight = 0x50;
|
|
this->m_typeCombo->SetSize(0x64, 0x12);
|
|
this->m_typeCombo->Move(0x32, 0x2B);
|
|
this->m_typeCombo->borderRed = 0x64;
|
|
this->m_typeCombo->borderGreen = 0x64;
|
|
this->m_typeCombo->borderBlue = 0x64;
|
|
this->m_typeCombo->red = 0xE8;
|
|
this->m_typeCombo->green = 0xE8;
|
|
this->m_typeCombo->blue = 0xE8;
|
|
this->AddChild(this->m_typeCombo);
|
|
|
|
this->m_subTypeCombo = new UIComboBoxDefWnd();
|
|
this->m_subTypeCombo->dropdownHeight = 0x50;
|
|
this->m_subTypeCombo->SetSize(0xBE, 0x12);
|
|
this->m_subTypeCombo->Move(0x9B, 0x2B);
|
|
this->m_subTypeCombo->borderRed = 0x64;
|
|
this->m_subTypeCombo->borderGreen = 0x64;
|
|
this->m_subTypeCombo->borderBlue = 0x64;
|
|
this->m_subTypeCombo->red = 0xE8;
|
|
this->m_subTypeCombo->green = 0xE8;
|
|
this->m_subTypeCombo->blue = 0xE8;
|
|
this->AddChild(this->m_subTypeCombo);
|
|
|
|
this->LoadRegionMaps();
|
|
this->InitJobCategoryCombo();
|
|
}
|
|
|
|
// OFFSET: 0x009458B0
|
|
// FUNCTION: fn_12835
|
|
void UISeekPartyMBWnd::LoadRegionMaps() {
|
|
g_session.m_hotkeyScript->HasTable("map_list");
|
|
std::string unused;
|
|
|
|
int regionCount = 2;
|
|
for (;; ++regionCount) {
|
|
int regionId = 0;
|
|
const char* regionName = nullptr;
|
|
if (g_session.m_hotkeyScript->Call("queryRegionInfo", "d>ds", regionCount, ®ionId, ®ionName)) {
|
|
if (!regionName) {
|
|
break;
|
|
}
|
|
this->m_typeCombo->AddOption(regionName, 0);
|
|
}
|
|
}
|
|
|
|
g_session.m_hotkeyScript->HasTable("map_list");
|
|
for (int region = 2; region < regionCount; ++region) {
|
|
std::vector<std::pair<std::string, int>> maps;
|
|
for (int index = 1;; ++index) {
|
|
int mapId = 0;
|
|
int level = 0;
|
|
const char* mapName = nullptr;
|
|
int red = 0;
|
|
int green = 0;
|
|
int blue = 0;
|
|
if (g_session.m_hotkeyScript->Call("queryMapInfo", "dd>ddsddd", region, index, &mapId, &level, &mapName, &red, &green, &blue)) {
|
|
if (!mapName) {
|
|
break;
|
|
}
|
|
std::string name;
|
|
name = mapName;
|
|
const int color = (static_cast<unsigned char>(blue) << 16) | (static_cast<unsigned char>(green) << 8) | static_cast<unsigned char>(red);
|
|
maps.push_back(std::pair<std::string, int>(name, color));
|
|
}
|
|
}
|
|
this->m_subTypes.insert(std::pair<int, std::vector<std::pair<std::string, int>>>(region, maps));
|
|
}
|
|
|
|
this->m_typeCombo->Select(0);
|
|
this->SendMsg(this->m_typeCombo, 0x27, 0, 0, 0, 0);
|
|
}
|