mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Initial commit: wowee native WoW 3.3.5a client
This commit is contained in:
commit
ce6cb8f38e
147 changed files with 32347 additions and 0 deletions
73
include/ui/realm_screen.hpp
Normal file
73
include/ui/realm_screen.hpp
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
#pragma once
|
||||
|
||||
#include "auth/auth_handler.hpp"
|
||||
#include <imgui.h>
|
||||
#include <string>
|
||||
#include <functional>
|
||||
|
||||
namespace wowee { namespace ui {
|
||||
|
||||
/**
|
||||
* Realm selection screen UI
|
||||
*
|
||||
* Displays available realms and allows user to select one
|
||||
*/
|
||||
class RealmScreen {
|
||||
public:
|
||||
RealmScreen();
|
||||
|
||||
/**
|
||||
* Render the UI
|
||||
* @param authHandler Reference to auth handler
|
||||
*/
|
||||
void render(auth::AuthHandler& authHandler);
|
||||
|
||||
/**
|
||||
* Set callback for realm selection
|
||||
* @param callback Function to call when realm is selected (receives realm name and address)
|
||||
*/
|
||||
void setOnRealmSelected(std::function<void(const std::string&, const std::string&)> callback) {
|
||||
onRealmSelected = callback;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a realm has been selected
|
||||
*/
|
||||
bool hasSelection() const { return realmSelected; }
|
||||
|
||||
/**
|
||||
* Get selected realm info
|
||||
*/
|
||||
const std::string& getSelectedName() const { return selectedRealmName; }
|
||||
const std::string& getSelectedAddress() const { return selectedRealmAddress; }
|
||||
|
||||
private:
|
||||
// UI state
|
||||
int selectedRealmIndex = -1;
|
||||
bool realmSelected = false;
|
||||
std::string selectedRealmName;
|
||||
std::string selectedRealmAddress;
|
||||
|
||||
// Status
|
||||
std::string statusMessage;
|
||||
|
||||
// Callbacks
|
||||
std::function<void(const std::string&, const std::string&)> onRealmSelected;
|
||||
|
||||
/**
|
||||
* Update status message
|
||||
*/
|
||||
void setStatus(const std::string& message);
|
||||
|
||||
/**
|
||||
* Get realm status text
|
||||
*/
|
||||
const char* getRealmStatus(uint8_t flags) const;
|
||||
|
||||
/**
|
||||
* Get population color
|
||||
*/
|
||||
ImVec4 getPopulationColor(float population) const;
|
||||
};
|
||||
|
||||
}} // namespace wowee::ui
|
||||
Loading…
Add table
Add a link
Reference in a new issue