Kelsidavis-WoWee/include/ui/character_create_screen.hpp
Kelsi 0605d1522d Add character creation screen with race/class/appearance customization
Implements a full character creation UI integrated into the existing flow.
In single-player mode, auth screen now goes to character creation before
entering the world. In online mode, a "Create Character" button on the
character selection screen sends CMSG_CHAR_CREATE to the server. Includes
WoW 3.3.5a race/class combo validation and appearance range limits.
2026-02-05 14:13:48 -08:00

42 lines
1.1 KiB
C++

#pragma once
#include "game/character.hpp"
#include "game/world_packets.hpp"
#include <imgui.h>
#include <string>
#include <functional>
#include <vector>
namespace wowee {
namespace game { class GameHandler; }
namespace ui {
class CharacterCreateScreen {
public:
CharacterCreateScreen();
void render(game::GameHandler& gameHandler);
void setOnCreate(std::function<void(const game::CharCreateData&)> cb) { onCreate = std::move(cb); }
void setOnCancel(std::function<void()> cb) { onCancel = std::move(cb); }
void setStatus(const std::string& msg, bool isError = false);
void reset();
private:
char nameBuffer[13] = {}; // WoW max name = 12 chars + null
int raceIndex = 0;
int classIndex = 0;
int genderIndex = 0;
int skin = 0, face = 0, hairStyle = 0, hairColor = 0, facialHair = 0;
std::string statusMessage;
bool statusIsError = false;
std::vector<game::Class> availableClasses;
void updateAvailableClasses();
std::function<void(const game::CharCreateData&)> onCreate;
std::function<void()> onCancel;
};
} // namespace ui
} // namespace wowee