6 #include "../Events/EventManager.h"
7 #include "../Methods/Methods.h"
8 #include "../Utils/Text.h"
80 bool RegisterEvent(std::string answer, std::function<
void(
Player, std::string, std::vector<EntryVal>)>
function);
86 std::map<std::string, std::function<void(Player, std::string, std::vector<EntryVal>)>>
answers;
98 #endif // UIMANAGER_H_
ManiaLink for UI list.
Definition: UIList.h:11
void OnEndMatch()
Event listener for EndMatch, closes center lists.
Definition: UIManager.cpp:207
void CloseList(Player player)
Close list for player and removes from memory.
Definition: UIManager.cpp:195
UIManager(Methods *serverPtr, EventManager *eventsPtr, std::map< std::string, Player > *playersPtr)
Constructor takes needed controller pointers.
Definition: UIManager.cpp:3
Manages the user interface on the server (ManiaLinks).
Definition: UIManager.h:17
Methods * server
Pointer to the server methods.
Definition: UIManager.h:83
bool DisplayList(UIList list, Player player, int currentPage=1)
Display list to player.
Definition: UIManager.cpp:72
Contains all information about a player in easy-to-use format.
Definition: Player.h:11
bool Display(UIFrame frame)
Display frame.
Definition: UIManager.cpp:62
ManiaLink for UI.
Definition: UIFrame.h:12
std::string formatPage(UIFrame frame)
Formats the page, including custom UI.
Definition: UIManager.cpp:230
Contains all server methods and returns usable data types.
Definition: Methods.h:15
bool RegisterEvent(std::string answer, std::function< void(Player, std::string, std::vector< EntryVal >)> function)
Register event to be handled on page answer.
Definition: UIManager.cpp:215
std::map< std::string, Player > * players
Pointer to the player list.
Definition: UIManager.h:85
void OnPlayerManialinkPageAnswer(Player player, std::string answer, std::vector< EntryVal > entries)
Callback handler voor ManiaLink page answers.
Definition: UIManager.cpp:26
std::map< std::string, std::function< void(Player, std::string, std::vector< EntryVal >)> > answers
List with ManiaLink answers to handle.
Definition: UIManager.h:86
EventManager * events
Pointer to the event manager.
Definition: UIManager.h:84
std::map< std::string, UIList > currentLists
Current lists displayed to players.
Definition: UIManager.h:88
Handles events (callbacks) from server to plugins.
Definition: EventManager.h:15