Safety in Help text
GUI image change: Added more characters in help font. Shortcuts: Change internal "no key" value from FFFF to 0000 git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@608 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
a236e40fa6
commit
2e2cd8073d
18
aide.c
18
aide.c
@ -69,11 +69,14 @@ const char * Valeur_Raccourci_Clavier(word NumeroRaccourci)
|
||||
return "(Problem)";
|
||||
else
|
||||
{
|
||||
if (Pointeur[0] == 0 || Pointeur[0] == 0xFFFF)
|
||||
if (Pointeur[0] == 0 && Pointeur[1] == 0)
|
||||
return "None";
|
||||
if (Pointeur[0] != 0 && Pointeur[1] == 0)
|
||||
return Nom_touche(Pointeur[0]);
|
||||
if (Pointeur[0] == 0 && Pointeur[1] != 0)
|
||||
return Nom_touche(Pointeur[1]);
|
||||
|
||||
strcpy(Noms_raccourcis, Nom_touche(Pointeur[0]));
|
||||
if (Pointeur[1] == 0 || Pointeur[1] == 0xFFFF)
|
||||
return Noms_raccourcis;
|
||||
strcat(Noms_raccourcis, " ");
|
||||
strcat(Noms_raccourcis, Nom_touche(Pointeur[1]));
|
||||
return Noms_raccourcis;
|
||||
@ -100,7 +103,7 @@ void Afficher_aide(void)
|
||||
char TypeLigne; // N: Normale, T: Titre, S: Sous-titre
|
||||
// -: Ligne inférieur de sous-titre
|
||||
const char * Ligne;
|
||||
char Buffer[44]; // Buffer texte utilisé pour formater les noms de
|
||||
char Buffer[45]; // Buffer texte utilisé pour formater les noms de
|
||||
// raccourcis clavier
|
||||
short Position_lien=0; // Position du premier caractère "variable"
|
||||
short Taille_lien=0; // Taille de la partie variable
|
||||
@ -134,7 +137,12 @@ void Afficher_aide(void)
|
||||
Position_lien = strstr(Ligne,"%s") - Ligne;
|
||||
Lien=Valeur_Raccourci_Clavier(Table_d_aide[Section_d_aide_en_cours].Table_aide[Ligne_de_depart + Indice_de_ligne].valeur);
|
||||
Taille_lien=strlen(Lien);
|
||||
sprintf(Buffer, Ligne, Lien);
|
||||
snprintf(Buffer, 44, Ligne, Lien);
|
||||
if (strlen(Ligne)+Taille_lien-2>44)
|
||||
{
|
||||
Buffer[43]=CARACTERE_SUSPENSION;
|
||||
Buffer[44]='\0';
|
||||
}
|
||||
Ligne = Buffer;
|
||||
}
|
||||
|
||||
|
||||
BIN
gfx2gui.gif
BIN
gfx2gui.gif
Binary file not shown.
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 21 KiB |
14
init.c
14
init.c
@ -886,10 +886,10 @@ void Initialisation_des_boutons(void)
|
||||
|
||||
for (Indice_bouton=0;Indice_bouton<NB_BOUTONS;Indice_bouton++)
|
||||
{
|
||||
Bouton[Indice_bouton].Raccourci_gauche[0]=0xFFFF;
|
||||
Bouton[Indice_bouton].Raccourci_gauche[1]=0xFFFF;
|
||||
Bouton[Indice_bouton].Raccourci_droite[0]=0xFFFF;
|
||||
Bouton[Indice_bouton].Raccourci_droite[1]=0xFFFF;
|
||||
Bouton[Indice_bouton].Raccourci_gauche[0]=0;
|
||||
Bouton[Indice_bouton].Raccourci_gauche[1]=0;
|
||||
Bouton[Indice_bouton].Raccourci_droite[0]=0;
|
||||
Bouton[Indice_bouton].Raccourci_droite[1]=0;
|
||||
Initialiser_bouton(Indice_bouton,
|
||||
0,0,
|
||||
1,1,
|
||||
@ -1951,7 +1951,7 @@ int Charger_CFG(int Tout_charger)
|
||||
&& (CFG_Header.Version2== 0)
|
||||
&& (CFG_Header.Beta1== 97))
|
||||
{
|
||||
// Les touches 00FF (pas de touche) sont a comprendre comme 0xFFFF
|
||||
// Les touches 00FF (pas de touche) sont a comprendre comme 0x0000
|
||||
Conversion_touches = 2;
|
||||
}
|
||||
// Version SDL
|
||||
@ -1985,9 +1985,9 @@ int Charger_CFG(int Tout_charger)
|
||||
else if (Conversion_touches==2)
|
||||
{
|
||||
if (CFG_Infos_touche.Touche == 0x00FF)
|
||||
CFG_Infos_touche.Touche = 0xFFFF;
|
||||
CFG_Infos_touche.Touche = 0x0000;
|
||||
if (CFG_Infos_touche.Touche2 == 0x00FF)
|
||||
CFG_Infos_touche.Touche2 = 0xFFFF;
|
||||
CFG_Infos_touche.Touche2 = 0x0000;
|
||||
}
|
||||
|
||||
for (Indice2=0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user