Mercurial > hg > openttd
changeset 1990:2bc5509ab3eb draft
(svn r2496) -Fix: [1179933] When toggling build/remove via keyboard the selection wasn't correctly redrawn
author | tron <tron@openttd.org> |
---|---|
date | Wed, 29 Jun 2005 08:14:09 +0000 |
parents | ba2a1117c648 |
children | 7441838dc9c7 |
files | rail_gui.c road_gui.c viewport.c viewport.h |
diffstat | 4 files changed, 13 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/rail_gui.c +++ b/rail_gui.c @@ -288,9 +288,9 @@ SetWindowDirty(w); SndPlayFx(SND_15_BEEP); - _thd.make_square_red = !!((w->click_state ^= (1 << 16)) & (1<<16)); - MarkTileDirty(_thd.pos.x, _thd.pos.y); + w->click_state ^= (1 << 16); _remove_button_clicked = (w->click_state & (1 << 16)) != 0; + SetSelectionRed((w->click_state & (1 << 16)) != 0); // handle station builder if( w->click_state & (1 << 16) )
--- a/road_gui.c +++ b/road_gui.c @@ -159,8 +159,8 @@ return; SetWindowDirty(w); SndPlayFx(SND_15_BEEP); - _thd.make_square_red = !!((w->click_state ^= (1 << 11)) & (1<<11)); - MarkTileDirty(_thd.pos.x, _thd.pos.y); + w->click_state ^= (1 << 11); + SetSelectionRed((w->click_state & (1 << 11)) != 0); } static void BuildRoadClick_Landscaping(Window *w)