summaryrefslogtreecommitdiff
path: root/widget.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-11-04 14:57:53 +0000
committertron <tron@openttd.org>2005-11-04 14:57:53 +0000
commita21762980d70b1639fc4ab7a5cdc6c5d5379b937 (patch)
tree95e6a39339b3719590f94fee745b5de3ad30d99e /widget.c
parent62d7732273ea4995daa0995bb3ca4d603ab246e9 (diff)
downloadopenttd-a21762980d70b1639fc4ab7a5cdc6c5d5379b937.tar.xz
(svn r3134) Forgot to commit one file in r3133
Diffstat (limited to 'widget.c')
-rw-r--r--widget.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/widget.c b/widget.c
index d80137bfe..614d68d13 100644
--- a/widget.c
+++ b/widget.c
@@ -86,26 +86,22 @@ void ScrollbarClickHandler(Window *w, const Widget *wi, int x, int y)
}
if (pos <= mi+9) {
// Pressing the upper button?
- if (!_demo_mode) {
- w->flags4 |= WF_SCROLL_UP;
- if (_scroller_click_timeout == 0) {
- _scroller_click_timeout = 6;
- if (sb->pos != 0) sb->pos--;
- }
- _left_button_clicked = false;
+ w->flags4 |= WF_SCROLL_UP;
+ if (_scroller_click_timeout == 0) {
+ _scroller_click_timeout = 6;
+ if (sb->pos != 0) sb->pos--;
}
+ _left_button_clicked = false;
} else if (pos >= ma-10) {
// Pressing the lower button?
- if (!_demo_mode) {
- w->flags4 |= WF_SCROLL_DOWN;
+ w->flags4 |= WF_SCROLL_DOWN;
- if (_scroller_click_timeout == 0) {
- _scroller_click_timeout = 6;
- if ((byte)(sb->pos + sb->cap) < sb->count)
- sb->pos++;
- }
- _left_button_clicked = false;
+ if (_scroller_click_timeout == 0) {
+ _scroller_click_timeout = 6;
+ if ((byte)(sb->pos + sb->cap) < sb->count)
+ sb->pos++;
}
+ _left_button_clicked = false;
} else {
//
Point pt = HandleScrollbarHittest(sb, mi, ma);