From c72dcd184055c9bec227eba7d13b82d42b214d73 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Mon, 15 Dec 2008 16:33:30 +0000 Subject: [PATCH] Only displays the coordinates if the mouse moved. Next step is to check the Operations and see wich of them are displaying the coordinates, wich are not, and decide wether we always display them in the main loop (smaller code for operations) or in each atomic action in operation (more code in the atomic actions but allow for displaying anything, like the selected color for the pipette, radius for the circle tool, relative positions for lines and rectangles, and so on. Might be interesting. We may also display the basic corrdinates and let each operation display (or not display) some string in the remaining menubar space. git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@383 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- moteur.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/moteur.c b/moteur.c index 2717661b..0f857b28 100644 --- a/moteur.c +++ b/moteur.c @@ -921,8 +921,6 @@ void Gestion_principale(void) Afficher_curseur(); } } - Old_MX=Mouse_X; - Old_MY=Mouse_Y; } } } @@ -949,7 +947,7 @@ void Gestion_principale(void) { // Le curseur se trouve dans l'image - if ( (Curseur_dans_menu_precedent) && (Menu_visible) ) + if ( (Curseur_dans_menu_precedent) && (Menu_visible) && Old_MY!=Mouse_Y && Old_MX != Mouse_X) // On ne met les coordonnées à jour que si la souris a bougé. Problème, ça va merder si on scroll l'écran... { if ( (Operation_en_cours!=OPERATION_PIPETTE) && (Operation_en_cours!=OPERATION_REMPLACER) ) @@ -963,6 +961,8 @@ void Gestion_principale(void) } Print_coordonnees(); } + Old_MX=Mouse_X; + Old_MY=Mouse_Y; Blink=Operation[Operation_en_cours][Mouse_K][Operation_Taille_pile].Effacer_curseur;