18#ifndef HEADER_SERVER_SELECTION_HPP
19#define HEADER_SERVER_SELECTION_HPP
21#include "guiengine/screen.hpp"
22#include "guiengine/widgets/list_widget.hpp"
23#include "guiengine/widgets/text_box_widget.hpp"
27namespace Online {
class XMLRequest; }
32 class IconButtonWidget;
40 class STKModifiedSpriteBank;
62 std::vector<std::shared_ptr<Server> > m_servers;
68 video::ITexture* m_bookmark_icon;
69 video::ITexture* m_global_icon;
73 irr::gui::STKModifiedSpriteBank* m_icon_bank;
80 bool m_refreshing_server;
82 float m_refresh_timer;
91 bool m_ipv6_only_without_nat64;
92 bool m_ip_warning_shown;
93 int64_t m_last_load_time;
94 std::shared_ptr<ServerList> m_server_list;
101 const std::
string& name,
102 const
int playerID) OVERRIDE;
108 bool sort_default) OVERRIDE;
110 virtual
void init() OVERRIDE;
117 virtual
void onUpdate(
float dt) OVERRIDE;
119 virtual
void onTextUpdated() OVERRIDE { copyFromServerList(); }
121 virtual bool onEnterPressed(
const irr::core::stringw& text) OVERRIDE
124 void copyFromServerList();
127 {
return m_server_list_widget; }
Definition: text_box_widget.hpp:42
Declares a class to be a singleton.
Definition: screen.hpp:59
Represents a single GUI screen.
Definition: screen.hpp:97
A text field widget.
Definition: text_box_widget.hpp:53
ServerSelection.
Definition: server_selection.hpp:55
virtual void init() OVERRIDE
Triggers a refresh of the server list.
Definition: server_selection.cpp:152
bool m_sort_desc
To check (and set) if sort order is descending.
Definition: server_selection.hpp:76
void refresh()
Requests the servers manager to update its list of servers, and disables the 'refresh' button (till t...
Definition: server_selection.cpp:80
virtual void eventCallback(GUIEngine::Widget *widget, const std::string &name, const int playerID) OVERRIDE
implement callback from parent class GUIEngine::Screen
Definition: server_selection.cpp:353
virtual void unloaded() OVERRIDE
Callback invoked when this screen is being unloaded.
Definition: server_selection.cpp:556
ServerSelection()
Constructor, which loads the stkgui file.
Definition: server_selection.cpp:49
virtual void loadedFromFile() OVERRIDE
implement callback from parent class GUIEngine::Screen
Definition: server_selection.cpp:101
void loadList()
Load the servers into the main list.
Definition: server_selection.cpp:220
virtual void onColumnClicked(int column_id, bool sort_desc, bool sort_default) OVERRIDE
Change the sort order if a column was clicked.
Definition: server_selection.cpp:336
~ServerSelection()
Destructor.
Definition: server_selection.cpp:60
virtual void tearDown() OVERRIDE
Clean up.
Definition: server_selection.cpp:67
virtual void beforeAddingWidget() OVERRIDE
implement callback from parent class GUIEngine::Screen
Definition: server_selection.cpp:128
virtual void onUpdate(float dt) OVERRIDE
implement callback from parent class GUIEngine::Screen
Definition: server_selection.cpp:416
Definition: server.hpp:44
Contains all GUI engine related classes and functions.
Definition: abstract_state_manager.hpp:33
Definition: servers_manager.hpp:40