rodecomp/Source/UI/Window/UIRebirthWnd.cpp
ragnarok-clanker 858265cc69 Maintenance: Second pass: name remaining numeric switch case labels (identifier-only; no code change). ~3,500 more labels across 150
Batch #14936 by ragnarok-clanker: no function's compiled code changes; checked with 158 compiled unit(s), including every includer of Source/Client/Mode/GameModeEnums.h, Source/Client/Mode/ModeMessage.h, Source/Contents/Actors/ActorEnums.h, Source/Contents/Actors/PetEnums.h, Source/Contents/Combat/CombatTypes.h, Source/Contents/Configuration/ServiceEnums.h, Source/Contents/Effects/EffectPrimId.h, Source/Contents/Hotkeys/InterfaceHotkey.h, Source/Contents/Items/ItemId.h, Source/Contents/Items/ItemType.h, Source/Network/Packets/ModeResultEnums.h, Source/Network/Packets/NoticeEnums.h, Source/Network/Packets/PacketId.h, Source/UI/Window/UIEnums.h, Source/UI/Window/WindowId.h.
2026-11-08 12:37:46 +00:00

76 lines
2.2 KiB
C++

#include "UI/Window/UIRebirthWnd.h"
#include "UI/Window/UIEnums.h"
#include "Client/Mode/ModeMgr.h"
#include "UI/Buttons/UIBitmapButton.h"
#include "UI/Window/UIWindowMgr.h"
#include <windows.h>
#include <string>
// OFFSET: 0x00924A60
// FUNCTION: fn_12647
void UIRebirthWnd::OnCreate(int width, int height) {
const std::string path = "유저인터페이스\\";
const char* const names[5][5] = {
{"esc_05a", "esc_05b", "esc_05c"},
{"esc_04a", "esc_04b", "esc_04c"},
{"esc_01a", "esc_01b", "esc_01c"},
{"esc_03a", "esc_03b", "esc_03c"},
{"esc_02a", "esc_02b", "esc_02c"},
};
const int ids[5] = {353, 220, 252, 251, 185};
const RECT positions[5] = {{29, 22}, {29, 45}, {29, 68}, {29, 91}, {29, 119}};
for (int index = 0; index < 5; ++index) {
UIBitmapButton* button = new UIBitmapButton();
button->SetBitmap((path + names[index][0] + ".bmp").c_str(), 0, 0);
button->SetBitmap((path + names[index][1] + ".bmp").c_str(), 1, 0);
button->SetBitmap((path + names[index][2] + ".bmp").c_str(), 2, 0);
button->SetSize(button->BitmapWidth(), button->BitmapHeight());
button->Move(positions[index].left, positions[index].top);
button->SetId(ids[index]);
this->AddChild(button);
}
this->m_message0 = 252;
}
// OFFSET: 0x00938E30
// FUNCTION: fn_12753
int UIRebirthWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) {
CMode* mode = g_modeMgr.GetGameMode();
if (message != 6) {
return UIFrameWnd::SendMsg(sender, message, argument1, argument2, argument3, argument4);
}
switch (argument1) {
case ID_CANCEL:
g_windowMgr.CloseWindow(129);
break;
case ID_RESTART:
mode->SendMsg(25, 0, 0, 0, 0);
g_windowMgr.CloseWindow(129);
break;
case ID_QUIT:
g_windowMgr.CloseWindow(129);
mode->SendMsg(88, 0, 0, 0, 0);
break;
case ID_TO_CHARACTER_SELECT:
mode->SendMsg(25, 1, 0, 0, 0);
g_windowMgr.CloseWindow(129);
g_windowMgr.CloseWindow(269);
break;
case ID_REBIRTH:
mode->SendMsg(250, 0, 0, 0, 0);
g_windowMgr.CloseWindow(129);
break;
}
return 0;
}
// OFFSET: 0x00911950
// FUNCTION: fn_12521
UIRebirthWnd::UIRebirthWnd() : UIFrameWnd(0) {
}