diff options
author | alberth <alberth@openttd.org> | 2013-10-01 20:22:38 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2013-10-01 20:22:38 +0000 |
commit | 26dbdafeedf116bcdf75dfdaaf5a98760630cc13 (patch) | |
tree | 887ab2ad8047a1043eee6f371ac5552bcc5e6be8 | |
parent | 5437a588a0ee819487ac6dd0da511d70d5824bff (diff) | |
download | openttd-26dbdafeedf116bcdf75dfdaaf5a98760630cc13.tar.xz |
(svn r25804) -Fix[FS#5739]: Lower sprite and text at the vehicle bar if it is pressed (adf88).
-rw-r--r-- | src/vehicle_gui.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index 17e9dcc96..d02546e90 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -2626,8 +2626,9 @@ public: int text_right = r.right - (rtl ? text_offset : (uint)WD_FRAMERECT_RIGHT); int image_left = (rtl ? text_right + 1 : r.left) + WD_IMGBTN_LEFT; int image = ((v->vehstatus & VS_STOPPED) != 0) ? SPR_FLAG_VEH_STOPPED : SPR_FLAG_VEH_RUNNING; - DrawSprite(image, PAL_NONE, image_left, r.top + WD_IMGBTN_TOP); - DrawString(text_left, text_right, r.top + WD_FRAMERECT_TOP, str, TC_FROMSTRING, SA_HOR_CENTER); + int lowered = this->IsWidgetLowered(WID_VV_START_STOP) ? 1 : 0; + DrawSprite(image, PAL_NONE, image_left + lowered, r.top + WD_IMGBTN_TOP + lowered); + DrawString(text_left + lowered, text_right + lowered, r.top + WD_FRAMERECT_TOP + lowered, str, TC_FROMSTRING, SA_HOR_CENTER); } virtual void OnClick(Point pt, int widget, int click_count) |