Permalink
Browse files

[Add] MP serverlist GUI now fully functional

Added library JsonCpp into RoR source tree (move to dependencies later!)
1 parent 7b87285 commit 832383a581ee4c4c9467e11c7deaa59c18c28695 @only-a-ptr only-a-ptr committed Oct 19, 2016
@@ -3,16 +3,16 @@
<Widget type="Window" skin="WindowCSX" position="10 10 820 480" layer="Middle" name="_Main">
<Property key="Caption" value="Multiplayer"/>
<Property key="MinSize" value="350 200"/>
- <Widget type="TabControl" skin="TabControl" position="0 0 810 445" name="tab_control">
+ <Widget type="TabControl" skin="TabControl" position="0 0 810 445" align="Stretch" name="tab_control">
<Widget type="TabItem" skin="" position="2 24 804 417" name="tab_online">
<Property key="Caption" value="Online"/>
<Widget type="EditBox" skin="WordWrapEmpty" position="10 5 170 20">
<Property key="Caption" value="Available Servers:"/>
</Widget>
- <Widget type="Button" skin="Button" position="700 380 100 35" align="Right Bottom" name="joinbutton">
+ <Widget type="Button" skin="Button" position="645 380 155 35" align="Right Bottom" name="join_button">
<Property key="Caption" value="Join"/>
</Widget>
- <Widget type="MultiListBox" skin="MultiListBox" position="5 25 800 355" align="HStretch VStretch" name="servers_list">
+ <Widget type="MultiListBox" skin="MultiListBox" position="5 25 795 355" align="HStretch VStretch" name="servers_list">
<Widget type="MultiListItem" skin="skin_Default" position="0 0 284 326" name="server_name">
<Property key="ItemResizingPolicy" value="Fixed"/>
<Property key="ItemWidth" value="284"/>
@@ -38,6 +38,15 @@
<Property key="Caption" value="RoR_Net 2.37"/>
<Property key="TextAlign" value="Right Top"/>
</Widget>
+ <Widget type="Button" skin="Button" position="5 380 165 35" align="Left Bottom" name="refresh_button">
+ <Property key="Caption" value="Refresh"/>
+ </Widget>
+ <Widget type="TextBox" skin="TextBox" position="235 185 345 20" align="HStretch VStretch" name="status_label">
+ <Property key="Caption" value="* * * * UPDATING * * * *"/>
+ <Property key="TextColour" value="1 0.832031 0"/>
+ <Property key="TextAlign" value="HCenter VCenter"/>
+ <Property key="Visible" value="false"/>
+ </Widget>
</Widget>
<Widget type="TabItem" skin="" position="2 24 804 417" name="tab_enter_ip">
<Property key="Caption" value="Enter IP"/>
@@ -225,6 +225,21 @@ set( SOURCE_FILES
terrain/map/SurveyMapManager.{h,cpp}
terrain/map/SurveyMapTextureCreator.{h,cpp}
threadpool/ThreadPool.h
+ utils/json/allocator.h
+ utils/json/assertions.h
+ utils/json/autolink.h
+ utils/json/config.h
+ utils/json/features.h
+ utils/json/forwards.h
+ utils/json/json.h
+ utils/json/json_reader.cpp
+ utils/json/json_tool.h
+ utils/json/json_value.cpp
+ utils/json/json_writer.cpp
+ utils/json/reader.h
+ utils/json/value.h
+ utils/json/version.h
+ utils/json/writer.h
utils/CollisionTools.{h,cpp}
utils/ConfigFile.{h,cpp}
utils/ErrorUtils.{h,cpp}
@@ -46,6 +46,7 @@
#include "GUI_LoadingWindow.h"
#include "GUI_MainSelector.h"
#include "GUI_MultiplayerClientList.h"
+#include "GUI_MultiplayerSelector.h"
#include "Heathaze.h"
#include "InputEngine.h"
#include "Language.h"
@@ -800,10 +801,14 @@ void MainThread::MainMenuLoopUpdate(float seconds_since_last_frame)
}
#ifdef USE_SOCKETW
- if (App::GetActiveMpState() == App::MP_STATE_CONNECTED)
- {
+ if (App::GetActiveMpState() == App::MP_STATE_CONNECTED)
+ {
App::GetGuiManager()->GetMpClientList()->update();
- }
+ }
+ else if (App::GetGuiManager()->GetMpSelector()->IsRefreshThreadRunning())
+ {
+ App::GetGuiManager()->GetMpSelector()->CheckAndProcessRefreshResult();
+ }
#endif // USE_SOCKETW
RoR::App::GetInputEngine()->Capture();
Oops, something went wrong.

0 comments on commit 832383a

Please sign in to comment.