diff options
author | zoniq <zoniq@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2008-04-11 23:55:35 +0000 |
---|---|---|
committer | zoniq <zoniq@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2008-04-11 23:55:35 +0000 |
commit | d69292ea7ef8ff4d2ca271d9abc8143d1368e4d8 (patch) | |
tree | c8dda1de7d7b0fc00a05588d39bef20c77c50be5 | |
parent | b0d229abdaedd7a39802c1db82457d6ff3134121 (diff) | |
download | navit-svn-d69292ea7ef8ff4d2ca271d9abc8143d1368e4d8.tar.gz |
Add:gui/internal:some comments
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit/src@1004 ffa7fe5e-494d-0410-b361-a75ebd5db220
-rw-r--r-- | gui/internal/gui_internal.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gui/internal/gui_internal.c b/gui/internal/gui_internal.c index 503613a6..8c4e1476 100644 --- a/gui/internal/gui_internal.c +++ b/gui/internal/gui_internal.c @@ -230,9 +230,13 @@ gui_internal_button(struct gui_priv *this, int pressed, int button, struct point { struct graphics *gra=this->gra; struct point pnt; - if (!this->menu) { - if (!navit_handle_button(this->nav, pressed, button, p, NULL)) + + // if still on the map (not in the menu, yet): + if (!this->menu) { + // check whether the position of the mouse changed during press/release OR if it is the scrollwheel + if (!navit_handle_button(this->nav, pressed, button, p, NULL) || button >=4) return; + // draw menu this->menu++; graphics_draw_mode(gra, draw_mode_begin); gui_internal_clear(this); @@ -240,6 +244,8 @@ gui_internal_button(struct gui_priv *this, int pressed, int button, struct point graphics_draw_mode(gra, draw_mode_end); return; } + + // if already in the menu: if (pressed) { graphics_draw_mode(gra, draw_mode_begin); gui_internal_highlight(this, p); |