Rigs of Rods 2023.09
Soft-body Physics Simulation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
GUI_MultiplayerSelector.h
Go to the documentation of this file.
1/*
2 This source file is part of Rigs of Rods
3
4 Copyright 2005-2012 Pierre-Michel Ricordel
5 Copyright 2007-2012 Thomas Fischer
6 Copyright 2013-2020 Petr Ohlidal
7
8 For more information, see http://www.rigsofrods.org/
9
10 Rigs of Rods is free software: you can redistribute it and/or modify
11 it under the terms of the GNU General Public License version 3, as
12 published by the Free Software Foundation.
13
14 Rigs of Rods is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with Rigs of Rods. If not, see <http://www.gnu.org/licenses/>.
21*/
22
23#pragma once
24
25#include "Application.h"
26#include "OgreImGui.h" // ImVec4
27
28#include <future>
29#include <memory>
30#include <thread>
31#include <vector>
32
33namespace RoR{
34namespace GUI {
35
37{
39 std::string display_passwd;
40 std::string display_name;
41 std::string display_terrn;
44 std::string display_users;
45 std::string net_host;
46 std::string net_version;
47 std::string display_version;
49 std::string display_host;
50};
51
52typedef std::vector<MpServerInfo> MpServerInfoVec;
53
55{
56public:
57 const float BUTTONS_EXTRA_SPACE = 6.f;
58 const float TABLE_PADDING_LEFT = 4.f;
59
61
62 void SetVisible(bool v);
63 inline bool IsVisible() const { return m_is_visible; }
64 void StartAsyncRefresh();
65 void Draw();
66 void DisplayRefreshFailed(CurlFailInfo* failinfo);
69
70private:
71 void DrawSettingsTab();
72 void DrawDirectTab();
73 void DrawServerlistTab();
74
77 char m_window_title[100];
78 bool m_is_visible = false;
79 bool m_draw_table = false;
84 Ogre::TexturePtr m_lock_icon;
85 bool m_show_spinner = false;
87
88 // status or error messages
89 std::string m_serverlist_msg;
93};
94
95} // namespace GUI
96} // namespace RoR
Central state/object manager and communications hub.
std::string m_serverlist_httpmsg
Displayed as dimmed text.
void DisplayRefreshFailed(CurlFailInfo *failinfo)
void StartAsyncRefresh()
Launch refresh from main thread.
std::string m_serverlist_curlmsg
Displayed as dimmed text.
void UpdateServerlist(MpServerInfoVec *data)
Wrapper for classic c-string (local buffer) Refresher: strlen() excludes '\0' terminator; strncat() A...
Definition Str.h:36
std::vector< MpServerInfo > MpServerInfoVec