Disables keyboard on "Attendre_fin_de_clic", so we no longer need to empty the event loop.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@593 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
00b67c23ef
commit
f90af64c83
12
divers.c
12
divers.c
@ -94,6 +94,7 @@ void Set_color(byte Couleur, byte Rouge, byte Vert, byte Bleu)
|
|||||||
SDL_SetPalette(Ecran_SDL, SDL_LOGPAL, &comp, Couleur, 1);
|
SDL_SetPalette(Ecran_SDL, SDL_LOGPAL, &comp, Couleur, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
void Attendre_fin_de_click(void)
|
void Attendre_fin_de_click(void)
|
||||||
{
|
{
|
||||||
SDL_Event event;
|
SDL_Event event;
|
||||||
@ -115,6 +116,17 @@ void Attendre_fin_de_click(void)
|
|||||||
Mouse_K=0;
|
Mouse_K=0;
|
||||||
INPUT_Nouveau_Mouse_K=0;
|
INPUT_Nouveau_Mouse_K=0;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
void Attendre_fin_de_click(void)
|
||||||
|
{
|
||||||
|
// On désactive tous les raccourcis clavier
|
||||||
|
Desactiver_clavier=1;
|
||||||
|
|
||||||
|
// On force la souris à se mettre à 0
|
||||||
|
Mouse_K=0;
|
||||||
|
INPUT_Nouveau_Mouse_K=0;
|
||||||
|
}
|
||||||
|
|
||||||
void Effacer_image_courante_Stencil(byte Couleur, byte * Pochoir)
|
void Effacer_image_courante_Stencil(byte Couleur, byte * Pochoir)
|
||||||
//Effacer l'image courante avec une certaine couleur en mode Stencil
|
//Effacer l'image courante avec une certaine couleur en mode Stencil
|
||||||
|
|||||||
3
global.h
3
global.h
@ -136,6 +136,9 @@ GFX2_GLOBAL Uint8* Etat_Du_Clavier; // Scancode de la touche en cours et etat d
|
|||||||
#define MOD_SHIFT 0x1000
|
#define MOD_SHIFT 0x1000
|
||||||
#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;
|
||||||
|
|||||||
5
input.c
5
input.c
@ -199,6 +199,7 @@ 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();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -269,6 +270,8 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -294,11 +297,13 @@ 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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user