Merge 1.9.0-beta2
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $Id: network_gui.cpp 27893 2017-08-13 18:38:42Z frosch $ */
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
@@ -14,7 +14,6 @@
|
||||
#include "../strings_func.h"
|
||||
#include "../date_func.h"
|
||||
#include "../fios.h"
|
||||
#include "../error.h"
|
||||
#include "network_client.h"
|
||||
#include "network_gui.h"
|
||||
#include "network_gamelist.h"
|
||||
@@ -32,7 +31,7 @@
|
||||
#include "../core/geometry_func.hpp"
|
||||
#include "../genworld.h"
|
||||
#include "../map_type.h"
|
||||
#include "../zoom_func.h"
|
||||
#include "../guitimer_func.h"
|
||||
|
||||
#include "../widgets/network_widget.h"
|
||||
|
||||
@@ -40,6 +39,9 @@
|
||||
#include "../table/sprites.h"
|
||||
|
||||
#include "../stringfilter_type.h"
|
||||
|
||||
#include "../error.h"
|
||||
#include "../zoom_func.h"
|
||||
#include "../watch_gui.h"
|
||||
|
||||
#include "../safeguards.h"
|
||||
@@ -237,6 +239,7 @@ protected:
|
||||
Scrollbar *vscroll; ///< vertical scrollbar of the list of servers
|
||||
QueryString name_editbox; ///< Client name editbox.
|
||||
QueryString filter_editbox; ///< Editbox for filter on servers
|
||||
GUITimer requery_timer; ///< Timer for network requery
|
||||
bool UDP_CC_queried;
|
||||
|
||||
int lock_offset; ///< Left offset for lock icon.
|
||||
@@ -486,6 +489,8 @@ public:
|
||||
this->server = this->last_joined;
|
||||
if (this->last_joined != NULL) NetworkUDPQueryServer(this->last_joined->address);
|
||||
|
||||
this->requery_timer.SetInterval(MILLISECONDS_PER_TICK);
|
||||
|
||||
this->servers.SetListing(this->last_sorting);
|
||||
this->servers.SetSortFuncs(this->sorter_funcs);
|
||||
this->servers.SetFilterFuncs(this->filter_funcs);
|
||||
@@ -937,8 +942,11 @@ public:
|
||||
this->vscroll->SetCapacityFromWidget(this, WID_NG_MATRIX);
|
||||
}
|
||||
|
||||
virtual void OnTick()
|
||||
virtual void OnRealtimeTick(uint delta_ms)
|
||||
{
|
||||
if (!this->requery_timer.Elapsed(delta_ms)) return;
|
||||
this->requery_timer.SetInterval(MILLISECONDS_PER_TICK);
|
||||
|
||||
NetworkGameListRequery();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user