rodecomp/Source/UI/Buttons/UIDescriptRace.cpp
ragnarok-clanker 780c281aa2 Maintenance: Name window messaging constants: literal window ids (LookupWindow/EnsureWindow/CloseWindow/... -> WindowId), UIWindowMgr
Batch #14937 by ragnarok-clanker: no function's compiled code changes; checked with 251 compiled unit(s), including every includer of Source/Client/Mode/ModeMessage.h, Source/Contents/Actors/ActorEnums.h, Source/Network/Packets/PartyJoinPacket.h, Source/UI/Window/UIEnums.h, Source/UI/Window/WindowId.h.
2026-11-08 13:56:42 +00:00

43 lines
1.3 KiB
C++

#include "UI/Window/UIEnums.h"
#include "UI/Buttons/UIDescriptRace.h"
#include <windows.h>
#include <mmsystem.h>
// GLOBAL: gl_24988
unsigned char g_doramCreationEnabled;
// OFFSET: 0x0086D060
// FUNCTION: fn_11041
UIDescriptRace::UIDescriptRace(int race) : m_race(race), unknown_0284(0) {
this->m_createTime = timeGetTime();
this->m_noRace = race == 0;
}
// OFFSET: 0x008861C0
// FUNCTION: fn_11323
void UIDescriptRace::OnCreate(int, int) {
this->SendMsg(nullptr, UM_SETSTATE, this->m_noRace, 0, 0, 0);
}
// OFFSET: 0x008985D0
// FUNCTION: fn_11548
int UIDescriptRace::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) {
if (message == UM_SETSTATE && (this->m_race != 1 || g_doramCreationEnabled)) {
if (argument1) {
this->m_noRace = 1;
this->SetBitmap(this->m_race != 1 ? "유저인터페이스\\make_character_ver2\\img_human_on.bmp" : "유저인터페이스\\make_character_ver2\\img_doram_on.bmp", 0, 0);
return 0;
}
this->m_noRace = 0;
if (this->m_race == 1) {
this->SetBitmap("유저인터페이스\\make_character_ver2\\img_doram_off.bmp", 0, 0);
return 0;
}
this->SetBitmap("유저인터페이스\\make_character_ver2\\img_human_off.bmp", 0, 0);
}
return 0;
}