18 #ifndef HEADER_ONLINE_SCREEN_HPP
19 #define HEADER_ONLINE_SCREEN_HPP
21 #include "guiengine/screen.hpp"
22 #include "guiengine/widgets/list_widget.hpp"
25 #include <unordered_map>
30 namespace GUIEngine {
class CheckBoxWidget;
class ButtonWidget;
31 class IconButtonWidget;
class STKModifiedSpriteBank; }
44 core::stringw m_online_string;
46 core::stringw m_login_string;
58 std::shared_ptr<Server> m_entered_server;
70 irr::gui::STKModifiedSpriteBank
73 std::unordered_map<std::string, std::string> m_news_links;
79 virtual void onUpdate(
float delta) OVERRIDE;
91 const
int playerID) OVERRIDE;
94 virtual
void init() OVERRIDE;
98 virtual
void onColumnClicked(
int column_id,
bool sort_desc,
bool sort_default) OVERRIDE;
103 void setEnteredServerName(const core::stringw& name)
Declares a class to be a singleton.
Definition: screen.hpp:59
Represents a single GUI screen.
Definition: screen.hpp:94
Handles the networking main menu.
Definition: online_screen.hpp:40
GUIEngine::IconButtonWidget * m_online
Keep the widget to avoid looking it up every frame.
Definition: online_screen.hpp:52
GUIEngine::ButtonWidget * m_user_id
Keep the widget to to the user name.
Definition: online_screen.hpp:49
virtual void onUpdate(float delta) OVERRIDE
optional callback you can override to be notified at every frame.
Definition: online_screen.cpp:213
int m_icon_news_headline
Icon for headline news.
Definition: online_screen.hpp:66
int m_icon_red_dot
Icon for unread news.
Definition: online_screen.hpp:64
virtual bool onEscapePressed() OVERRIDE
implement callback from parent class GUIEngine::Screen
Definition: online_screen.cpp:360
virtual void init() OVERRIDE
implement callback from parent class GUIEngine::Screen
Definition: online_screen.cpp:115
virtual void loadedFromFile() OVERRIDE
implement callback from parent class GUIEngine::Screen
Definition: online_screen.cpp:74
int m_icon_news
Icon for normal news.
Definition: online_screen.hpp:68
virtual void beforeAddingWidget() OVERRIDE
implement callback from parent class GUIEngine::Screen
Definition: online_screen.cpp:106
core::stringw m_entered_server_name
Save the previous successfully connected server name.
Definition: online_screen.hpp:61
virtual void eventCallback(GUIEngine::Widget *widget, const std::string &name, const int playerID) OVERRIDE
implement callback from parent class GUIEngine::Screen
Definition: online_screen.cpp:254
virtual void unloaded() OVERRIDE
Callback invoked when this screen is being unloaded.
Definition: online_screen.cpp:98
Definition: server.hpp:44
Describes a IPv4 or IPv6 address in sockaddr_in(6) format, suitable in using with sendto.
Definition: socket_address.hpp:47
Contains all GUI engine related classes and functions.
Definition: abstract_state_manager.hpp:33