Fixes some little bugs with Attendre_fin_de_click.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@597 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Adrien Destugues 2009-02-04 20:30:02 +00:00
parent 211e88e2bc
commit 16b405ccfe
5 changed files with 1 additions and 8 deletions

View File

@ -936,6 +936,7 @@ void Bouton_Settings(void)
Config_choisie.Indice_Sensibilite_souris_Y=Fenetre_Attribut2+1; Config_choisie.Indice_Sensibilite_souris_Y=Fenetre_Attribut2+1;
break; break;
case 21 : // Nb pages Undo case 21 : // Nb pages Undo
Attendre_fin_de_click();
Effacer_curseur(); Effacer_curseur();
Num2str(Config_choisie.Nb_pages_Undo,Chaine,2); Num2str(Config_choisie.Nb_pages_Undo,Chaine,2);
Readline(142,52,Chaine,2,1); Readline(142,52,Chaine,2,1);

View File

@ -97,7 +97,6 @@ void Set_color(byte Couleur, byte Rouge, byte Vert, byte Bleu)
void Attendre_fin_de_click(void) void Attendre_fin_de_click(void)
{ {
// On désactive tous les raccourcis clavier // On désactive tous les raccourcis clavier
Desactiver_clavier=1;
while(Mouse_K) if(!Get_input()) Wait_VBL(); while(Mouse_K) if(!Get_input()) Wait_VBL();
} }

View File

@ -137,8 +137,6 @@ GFX2_GLOBAL Uint8* Etat_Du_Clavier; // Scancode de la touche en cours et etat d
#define MOD_CTRL 0x2000 #define MOD_CTRL 0x2000
#define MOD_ALT 0x4000 #define MOD_ALT 0x4000
GFX2_GLOBAL byte Desactiver_clavier;
GFX2_GLOBAL byte Quit_demande; // !=0 lorsque l'utilisateur demande la fermeture de fenêtre. GFX2_GLOBAL byte Quit_demande; // !=0 lorsque l'utilisateur demande la fermeture de fenêtre.
GFX2_GLOBAL byte Mouse_Facteur_de_correction_X; GFX2_GLOBAL byte Mouse_Facteur_de_correction_X;

View File

@ -199,7 +199,6 @@ int Handle_Mouse_Release(SDL_MouseButtonEvent event)
INPUT_Nouveau_Mouse_K &= ~2; INPUT_Nouveau_Mouse_K &= ~2;
break; break;
} }
if(INPUT_Nouveau_Mouse_K==0) Desactiver_clavier=0;
return Move_cursor_with_constraints(); return Move_cursor_with_constraints();
} }
@ -271,7 +270,6 @@ int Handle_Key_Press(SDL_KeyboardEvent event)
else Touche = 0; else Touche = 0;
} }
if (Desactiver_clavier) Touche=0; // Utilisé uniquement dans Attendre fin de clic
return 0; return 0;
} }
@ -297,13 +295,11 @@ int Relache_controle(int CodeTouche, int Modifieur)
if(CodeTouche == (Config_Touche[SPECIAL_CLICK_LEFT]&0x0FFF) || (Config_Touche[SPECIAL_CLICK_LEFT]&Modifieur)) if(CodeTouche == (Config_Touche[SPECIAL_CLICK_LEFT]&0x0FFF) || (Config_Touche[SPECIAL_CLICK_LEFT]&Modifieur))
{ {
INPUT_Nouveau_Mouse_K &= ~1; INPUT_Nouveau_Mouse_K &= ~1;
if(INPUT_Nouveau_Mouse_K==0) Desactiver_clavier=0;
return Move_cursor_with_constraints(); return Move_cursor_with_constraints();
} }
if(CodeTouche == (Config_Touche[SPECIAL_CLICK_RIGHT]&0x0FFF) || (Config_Touche[SPECIAL_CLICK_RIGHT]&Modifieur)) if(CodeTouche == (Config_Touche[SPECIAL_CLICK_RIGHT]&0x0FFF) || (Config_Touche[SPECIAL_CLICK_RIGHT]&Modifieur))
{ {
INPUT_Nouveau_Mouse_K &= ~2; INPUT_Nouveau_Mouse_K &= ~2;
if(INPUT_Nouveau_Mouse_K==0) Desactiver_clavier=0;
return Move_cursor_with_constraints(); return Move_cursor_with_constraints();
} }

View File

@ -144,7 +144,6 @@ byte Readline_ex(word Pos_X,word Pos_Y,char * Chaine,byte Taille_affichee,byte T
byte Offset=0; // Indice du premier caractère affiché byte Offset=0; // Indice du premier caractère affiché
// Effacement de la chaîne // Effacement de la chaîne
Block(Fenetre_Pos_X+(Pos_X*Menu_Facteur_X),Fenetre_Pos_Y+(Pos_Y*Menu_Facteur_Y), Block(Fenetre_Pos_X+(Pos_X*Menu_Facteur_X),Fenetre_Pos_Y+(Pos_Y*Menu_Facteur_Y),
Taille_affichee*(Menu_Facteur_X<<3),(Menu_Facteur_Y<<3),COULEUR_FOND); Taille_affichee*(Menu_Facteur_X<<3),(Menu_Facteur_Y<<3),COULEUR_FOND);