summaryrefslogtreecommitdiff
path: root/src/toolbar_gui.cpp
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2011-12-15 19:54:23 +0000
committertruebrain <truebrain@openttd.org>2011-12-15 19:54:23 +0000
commitdf0afdf0dca6b3d4f621248ada2aed73d7481c66 (patch)
treefe5b1ab9e0e996c53e17d2eb82442b1829e89cbc /src/toolbar_gui.cpp
parent2ecbe895093f91bfdecbd8ab29d0641c2fd9a0f3 (diff)
downloadopenttd-df0afdf0dca6b3d4f621248ada2aed73d7481c66.tar.xz
(svn r23525) -Codechange: make Window::flags4 WindowFlags instead of uint16, with only values known in WindowFlags (and move out 2 timers to their own variable)
-Codechange: rename Window::flags4 to Window::flags -Codechange: move some non-inline functions from .hpp to .cpp
Diffstat (limited to 'src/toolbar_gui.cpp')
-rw-r--r--src/toolbar_gui.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp
index 60c239525..d349e4c3a 100644
--- a/src/toolbar_gui.cpp
+++ b/src/toolbar_gui.cpp
@@ -1094,7 +1094,7 @@ static CallBackFunction ToolbarScenDatePanel(Window *w)
static CallBackFunction ToolbarScenDateBackward(Window *w)
{
/* don't allow too fast scrolling */
- if ((w->flags4 & WF_TIMEOUT_MASK) <= WF_TIMEOUT_TRIGGER) {
+ if ((w->flags & WF_TIMEOUT) && w->timeout_timer <= 1) {
w->HandleButtonClick(TBSE_DATEBACKWARD);
w->SetDirty();
@@ -1108,7 +1108,7 @@ static CallBackFunction ToolbarScenDateBackward(Window *w)
static CallBackFunction ToolbarScenDateForward(Window *w)
{
/* don't allow too fast scrolling */
- if ((w->flags4 & WF_TIMEOUT_MASK) <= WF_TIMEOUT_TRIGGER) {
+ if ((w->flags & WF_TIMEOUT) && w->timeout_timer <= 1) {
w->HandleButtonClick(TBSE_DATEFORWARD);
w->SetDirty();
@@ -1566,7 +1566,7 @@ struct MainToolbarWindow : Window {
this->InitNested(desc, 0);
this->last_started_action = CBF_NONE;
- CLRBITS(this->flags4, WF_WHITE_BORDER_MASK);
+ CLRBITS(this->flags, WF_WHITE_BORDER);
this->SetWidgetDisabledState(TBN_PAUSE, _networking && !_network_server); // if not server, disable pause button
this->SetWidgetDisabledState(TBN_FASTFORWARD, _networking); // if networking, disable fast-forward button
PositionMainToolbar(this);
@@ -1868,7 +1868,7 @@ struct ScenarioEditorToolbarWindow : Window {
this->InitNested(desc, 0);
this->last_started_action = CBF_NONE;
- CLRBITS(this->flags4, WF_WHITE_BORDER_MASK);
+ CLRBITS(this->flags, WF_WHITE_BORDER);
PositionMainToolbar(this);
DoZoomInOutWindow(ZOOM_NONE, this);
}