1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- #pragma once
- #include <TextFeld.h>
- #include <Liste.h>
- #include <HashMap.h>
- #include "Menu.h"
- class ServerStatus : public ZeichnungHintergrund
- {
- private:
- Framework::Text name;
- Framework::Text ip;
- unsigned short sslPort;
- unsigned short port;
- Framework::Text playerName;
- int ping;
- Framework::Text status;
- int statusId;
- int requestId;
- Framework::HashMap<Framework::Text, Framework::Text> *secrets;
- Framework::AlphaFeld *closeAF;
- Framework::Knopf* join;
- public:
- ServerStatus(Framework::Text name, Framework::Text ip, unsigned short sslPort, unsigned short port, Framework::HashMap<Framework::Text, Framework::Text> *secrets);
- ~ServerStatus();
- virtual void updatePlayerName(Framework::Text playerName);
-
- virtual void doMausEreignis(Framework::MausEreignis& me, bool userRet) override;
- virtual bool tick(double time) override;
- virtual void render(Framework::Bild& rObj) override;
- Framework::Text getName() const;
- Framework::Text getIp() const;
- unsigned short getSSLPort() const;
- unsigned short getPort() const;
- Framework::HashMap<Framework::Text, Framework::Text>* zSecrets() const;
- bool canConnect() const;
- };
- class ServerSelectionMenu : public Menu
- {
- private:
- Framework::TextFeld* playerName;
- Framework::TextFeld* playerNameLabel;
- Framework::TextFeld* serverLabel;
- Framework::ZListe* serverList;
- Framework::Knopf* add;
- Framework::Knopf* refresh;
- public:
- ServerSelectionMenu(Framework::Bildschirm* zScreen);
- void addServer(Framework::Text name, Framework::Text ip, unsigned short sslPort, unsigned short port);
- bool hasServer(Framework::Text name) const;
- void removeServer(Framework::Text name) const;
- void saveServers() const;
- };
|