Contextual help in Effects menu

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@239 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud
2008-10-12 19:09:29 +00:00
parent 1af06aec53
commit 74d0b87233
8 changed files with 137 additions and 44 deletions

34
aide.c
View File

@@ -28,6 +28,7 @@
#include "graph.h"
#include "moteur.h"
#include "tables_aide.h"
#include "aide.h"
#include <string.h>
@@ -150,8 +151,6 @@ void Scroller_aide(void)
void Bouton_Aide(void)
{
short Bouton_clicke;
short Nb_lignes;
short Numero_bouton;
// Aide contextuelle
@@ -160,12 +159,37 @@ void Bouton_Aide(void)
Numero_bouton = Numero_bouton_sous_souris();
if (Numero_bouton != -1)
{
Section_d_aide_en_cours = 4 + Numero_bouton;
Position_d_aide_en_cours = 0;
Fenetre_aide(Numero_bouton, NULL);
return;
}
}
Fenetre_aide(-1, NULL);
}
// Ouvre l'ecran d'aide. Passer -1 pour la section par défaut (ou derniere,)
// Ou un nombre de l'enumération NUMEROS_DE_BOUTONS pour l'aide contextuelle.
void Fenetre_aide(int Section, const char *Sous_section)
{
short Bouton_clicke;
short Nb_lignes;
if (Section!=-1)
{
Section_d_aide_en_cours = 4 + Section;
Position_d_aide_en_cours = 0;
}
Nb_lignes=Table_d_aide[Section_d_aide_en_cours].Nombre_de_lignes;
if (Section!=-1 && Sous_section!=NULL)
{
int Indice=0;
for (Indice=0; Indice<Nb_lignes; Indice++)
if (Table_d_aide[Section_d_aide_en_cours].Table_aide[Indice][0] == 'T' &&
!strcmp(Table_d_aide[Section_d_aide_en_cours].Table_aide[Indice]+1, Sous_section))
{
Position_d_aide_en_cours = Indice;
break;
}
}
Ouvrir_fenetre(310,175,"Help / About...");