One more small speedup. The coordinates were always printed twice in the menubar. Also added a missing refresh when using the pipette and the color replace tools. Now you get a preview of the color under the cursor in the menubar.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@381 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Adrien Destugues 2008-12-15 15:17:47 +00:00
parent 6c8bbfbc56
commit 87d887e240
5 changed files with 7 additions and 12 deletions

View File

@ -4801,6 +4801,7 @@ void Bouton_Spray_Menu(void)
Print_dans_fenetre(50,151," Mono",CM_Noir,CM_Clair);
else
Print_dans_fenetre(50,151,"Multi",CM_Noir,CM_Clair);
UpdateRect(Fenetre_Pos_X+50*Menu_Facteur_X,Fenetre_Pos_Y+151*Menu_Facteur_Y,5*8*Menu_Facteur_X,8*Menu_Facteur_Y);
Afficher_curseur();
break;

View File

@ -388,7 +388,6 @@ void Wait_VBL(void)
// (Remarque, Windows arrondit généralement aux 10ms supérieures)
while (SDL_GetTicks() / Delai <= debut / Delai)
{
puts("Waiting...");
SDL_Delay(1);
}
}

BIN
gfx2.cfg

Binary file not shown.

View File

@ -1662,6 +1662,7 @@ void Print_dans_menu(char * Chaine, short Position)
// -- Afficher les coordonnées du pinceau dans le menu --
// Note : cette fonction n'affiche que les chiffres, pas les X: Y: qui sont dans la gestion principale, car elle est apellée très souvent.
void Print_coordonnees(void)
{
char Tempo[5];
@ -1683,6 +1684,7 @@ void Print_coordonnees(void)
Num2str(Pipette_Couleur,Tempo,3);
Print_dans_menu(Tempo,20);
Print_general(170*Menu_Facteur_X,Menu_Ordonnee_Texte," ",0,Pipette_Couleur);
UpdateRect(170*Menu_Facteur_X,Menu_Ordonnee_Texte,8*Menu_Facteur_X,8*Menu_Facteur_Y);
}
Num2str((dword)Pinceau_X,Tempo,4);

View File

@ -905,14 +905,7 @@ void Gestion_principale(void)
((((Mouse_Y-Menu_Ordonnee)/Menu_Facteur_Y)-2)>>2);
strcpy(Chaine,TITRE_BOUTON[Indice_bouton]);
sprintf(Chaine+strlen(Chaine),"%d",Temp);
strcat(Chaine," (");
sprintf(Chaine+strlen(Chaine),"%d",Principal_Palette[Temp].R);
strcat(Chaine,",");
sprintf(Chaine+strlen(Chaine),"%d",Principal_Palette[Temp].V);
strcat(Chaine,",");
sprintf(Chaine+strlen(Chaine),"%d",Principal_Palette[Temp].B);
strcat(Chaine,")");
sprintf(Chaine+strlen(Chaine),"%d (%d,%d,%d)",Temp,Principal_Palette[Temp].R,Principal_Palette[Temp].V,Principal_Palette[Temp].B);
for (Temp=strlen(Chaine); Temp<24; Temp++)
Chaine[Temp]=' ';
Chaine[24]=0;
@ -964,9 +957,9 @@ void Gestion_principale(void)
else
{
Print_dans_menu("X: Y: ( )",0);
Num2str(Pipette_Couleur,Chaine,3);
Print_dans_menu(Chaine,20);
Print_general(170*Menu_Facteur_X,Menu_Ordonnee_Texte," ",0,Pipette_Couleur);
//Num2str(Pipette_Couleur,Chaine,3);
//Print_dans_menu(Chaine,20);
Print_general(170*Menu_Facteur_X,Menu_Ordonnee_Texte,"@",0,Pipette_Couleur);
}
Print_coordonnees();
}