Implemented the log on and log off systems

This is a pretty straight forward port of the old version, including the
incredibly hacky server list. But I just need to remember that this is a
prototype.
This commit is contained in:
Kayne Ruse
2013-11-23 17:53:36 +11:00
parent ca86dc5fb8
commit 6ccc874583
11 changed files with 220 additions and 68 deletions
+10 -3
View File
@@ -37,7 +37,7 @@
class LobbyMenu : public BaseScene {
public:
//Public access members
LobbyMenu(ConfigUtility* const, UDPNetworkUtility* const);
LobbyMenu(ConfigUtility* const, UDPNetworkUtility* const, int* const);
~LobbyMenu();
protected:
@@ -59,6 +59,7 @@ protected:
//global
ConfigUtility& config;
UDPNetworkUtility& network;
int& clientIndex;
//members
Image image;
@@ -67,12 +68,18 @@ protected:
Button join;
Button back;
struct ServerInfo {
//server list
struct ServerInformation {
std::string name;
IPaddress address;
};
std::vector<ServerInfo> serverInfo;
std::vector<ServerInformation> serverInfo;
//a terrible hack, forgive me
//I'd love a proper gui system for this
SDL_Rect listBox;
ServerInformation* selection = nullptr;
};
#endif