mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-17 21:25:40 +00:00
(svn r6660) -Fix(r6631): Prevent the fast-foward button to toggle up and down when pressing shift.
The _fastforward and _pause bool are not exactly used as bool. So, when doing test with them, amek it so that the will appear as such
This commit is contained in:
parent
2489117e01
commit
9d24f3df0a
@ -1838,12 +1838,12 @@ static void MainToolbarWndProc(Window *w, WindowEvent *e)
|
||||
case WE_ON_EDIT_TEXT: HandleOnEditText(e); break;
|
||||
|
||||
case WE_MOUSELOOP:
|
||||
if (IsWindowWidgetLowered(w, 0) != _pause) {
|
||||
if (IsWindowWidgetLowered(w, 0) != !!_pause) {
|
||||
ToggleWidgetLoweredState(w, 0);
|
||||
SetWindowDirty(w);
|
||||
}
|
||||
|
||||
if (IsWindowWidgetLowered(w, 1) != _fast_forward) {
|
||||
if (IsWindowWidgetLowered(w, 1) != !!_fast_forward) {
|
||||
ToggleWidgetLoweredState(w, 1);
|
||||
SetWindowDirty(w);
|
||||
}
|
||||
@ -2033,12 +2033,12 @@ static void ScenEditToolbarWndProc(Window *w, WindowEvent *e)
|
||||
case WE_ON_EDIT_TEXT: HandleOnEditText(e); break;
|
||||
|
||||
case WE_MOUSELOOP:
|
||||
if (IsWindowWidgetLowered(w, 0) != _pause) {
|
||||
if (IsWindowWidgetLowered(w, 0) != !!_pause) {
|
||||
ToggleWidgetLoweredState(w, 0);
|
||||
SetWindowDirty(w);
|
||||
}
|
||||
|
||||
if (IsWindowWidgetLowered(w, 1) != _fast_forward) {
|
||||
if (IsWindowWidgetLowered(w, 1) != !!_fast_forward) {
|
||||
ToggleWidgetLoweredState(w, 1);
|
||||
SetWindowDirty(w);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user