6 #include "../Events/EventManager.h"
7 #include "../Methods/Methods.h"
8 #include "../Utils/Text.h"
79 bool RegisterEvent(std::string answer, std::function<
void(
Player, std::string, std::vector<EntryVal>)>
function);
85 std::map<std::string, std::function<void(Player, std::string, std::vector<EntryVal>)>>
answers;
97 #endif // UIMANAGER_H_
ManiaLink for UI list.
Definition: UIList.h:11
void OnEndMatch()
Event listener for EndMatch, closes center lists.
Definition: UIManager.cpp:192
void CloseList(Player player)
Close list for player and removes from memory.
Definition: UIManager.cpp:180
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:82
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:10
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:215
Contains all server methods and returns usable data types.
Definition: Methods.h:14
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:200
std::map< std::string, Player > * players
Pointer to the player list.
Definition: UIManager.h:84
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:85
EventManager * events
Pointer to the event manager.
Definition: UIManager.h:83
std::map< std::string, UIList > currentLists
Current lists displayed to players.
Definition: UIManager.h:87
Handles events (callbacks) from server to plugins.
Definition: EventManager.h:15