Merge branch 'save_ext' into jgrpp
# Conflicts: # config.lib # src/misc_gui.cpp # src/network/network_gui.cpp # src/settings_type.h # src/smallmap_gui.cpp # src/smallmap_gui.h # src/station_cmd.cpp # src/toolbar_gui.cpp # src/vehicle_gui.cpp # src/window.cpp
This commit is contained in:
@@ -50,6 +50,7 @@
|
||||
#include "toolbar_gui.h"
|
||||
#include "framerate_type.h"
|
||||
#include "zoning.h"
|
||||
#include "guitimer_func.h"
|
||||
|
||||
#include "widgets/toolbar_widget.h"
|
||||
|
||||
@@ -1992,6 +1993,8 @@ enum MainToolbarHotkeys {
|
||||
|
||||
/** Main toolbar. */
|
||||
struct MainToolbarWindow : Window {
|
||||
GUITimer timer;
|
||||
|
||||
MainToolbarWindow(WindowDesc *desc) : Window(desc)
|
||||
{
|
||||
this->InitNested(0);
|
||||
@@ -2002,6 +2005,8 @@ struct MainToolbarWindow : Window {
|
||||
this->SetWidgetDisabledState(WID_TN_FAST_FORWARD, _networking); // if networking, disable fast-forward button
|
||||
PositionMainToolbar(this);
|
||||
DoZoomInOutWindow(ZOOM_NONE, this);
|
||||
|
||||
this->timer.SetInterval(MILLISECONDS_PER_TICK);
|
||||
}
|
||||
|
||||
virtual void FindWindowPlacementAndResize(int def_width, int def_height)
|
||||
@@ -2107,8 +2112,11 @@ struct MainToolbarWindow : Window {
|
||||
_last_started_action = CBF_NONE;
|
||||
}
|
||||
|
||||
virtual void OnTick()
|
||||
virtual void OnRealtimeTick(uint delta_ms)
|
||||
{
|
||||
if (!this->timer.Elapsed(delta_ms)) return;
|
||||
this->timer.SetInterval(MILLISECONDS_PER_TICK);
|
||||
|
||||
if (this->IsWidgetLowered(WID_TN_PAUSE) != !!_pause_mode) {
|
||||
this->ToggleWidgetLoweredState(WID_TN_PAUSE);
|
||||
this->SetWidgetDirty(WID_TN_PAUSE);
|
||||
@@ -2326,6 +2334,8 @@ enum MainToolbarEditorHotkeys {
|
||||
};
|
||||
|
||||
struct ScenarioEditorToolbarWindow : Window {
|
||||
GUITimer timer;
|
||||
|
||||
ScenarioEditorToolbarWindow(WindowDesc *desc) : Window(desc)
|
||||
{
|
||||
this->InitNested(0);
|
||||
@@ -2334,6 +2344,8 @@ struct ScenarioEditorToolbarWindow : Window {
|
||||
CLRBITS(this->flags, WF_WHITE_BORDER);
|
||||
PositionMainToolbar(this);
|
||||
DoZoomInOutWindow(ZOOM_NONE, this);
|
||||
|
||||
this->timer.SetInterval(MILLISECONDS_PER_TICK);
|
||||
}
|
||||
|
||||
virtual void FindWindowPlacementAndResize(int def_width, int def_height)
|
||||
@@ -2461,8 +2473,11 @@ struct ScenarioEditorToolbarWindow : Window {
|
||||
this->SetWidgetDirty(WID_TE_DATE_FORWARD);
|
||||
}
|
||||
|
||||
virtual void OnTick()
|
||||
virtual void OnRealtimeTick(uint delta_ms)
|
||||
{
|
||||
if (!this->timer.Elapsed(delta_ms)) return;
|
||||
this->timer.SetInterval(MILLISECONDS_PER_TICK);
|
||||
|
||||
if (this->IsWidgetLowered(WID_TE_PAUSE) != !!_pause_mode) {
|
||||
this->ToggleWidgetLoweredState(WID_TE_PAUSE);
|
||||
this->SetDirty();
|
||||
|
Reference in New Issue
Block a user