summaryrefslogtreecommitdiff
path: root/src/window.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-08-12 16:44:51 +0000
committerfrosch <frosch@openttd.org>2010-08-12 16:44:51 +0000
commitd496ec65b920c207310f1cdcbacfe99e692516b5 (patch)
tree1b9605426b39c4599f6ff9a9f9840bfd9319bc00 /src/window.cpp
parentb8c401f64442dad1102af4966a98f29a3dd5014a (diff)
downloadopenttd-d496ec65b920c207310f1cdcbacfe99e692516b5.tar.xz
(svn r20470) -Codechange: Make arrow buttons lower and raise like other buttons when clicked.
Diffstat (limited to 'src/window.cpp')
-rw-r--r--src/window.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/window.cpp b/src/window.cpp
index c004a4b81..61ef20bef 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -329,14 +329,9 @@ static void DispatchLeftClickEvent(Window *w, int x, int y, int click_count)
* list's own button, then we should not process the click any further. */
if (HideDropDownMenu(w) == widget_index && widget_index >= 0) return;
- switch (widget_type) {
- /* special widget handling for buttons*/
- case WWT_PANEL | WWB_PUSHBUTTON: // WWT_PUSHBTN
- case WWT_IMGBTN | WWB_PUSHBUTTON: // WWT_PUSHIMGBTN
- case WWT_TEXTBTN | WWB_PUSHBUTTON: // WWT_PUSHTXTBTN
- w->HandleButtonClick(widget_index);
- break;
+ if ((widget_type & ~WWB_PUSHBUTTON) < WWT_LAST && (widget_type & WWB_PUSHBUTTON)) w->HandleButtonClick(widget_index);
+ switch (widget_type) {
case NWID_VSCROLLBAR:
case NWID_HSCROLLBAR:
ScrollbarClickHandler(w, nw, x, y);