Fix long filenames, and cursor keys while editing text

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@336 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud 2008-11-12 23:39:05 +00:00
parent bf7e4a53dd
commit 038303721c
2 changed files with 45 additions and 35 deletions

View File

@ -2778,7 +2778,7 @@ byte Bouton_Load_ou_Save(byte Load, byte Image)
{ {
// Restore the old filename // Restore the old filename
strcpy(Principal_Nom_fichier, Nom_fichier_Save); strcpy(Principal_Nom_fichier, Nom_fichier_Save);
Print_dans_fenetre(13+9*8,90,Principal_Nom_fichier,CM_Noir,CM_Clair); Print_Nom_fichier_dans_selecteur();
} }
Afficher_curseur(); Afficher_curseur();
break; break;

View File

@ -466,6 +466,16 @@ const char * Nom_touche(word Touche)
// Renvoie 0 s'il n'y a pas de caractère associé (shift, backspace, etc) // Renvoie 0 s'il n'y a pas de caractère associé (shift, backspace, etc)
word Conversion_ANSI(SDL_keysym Sym) word Conversion_ANSI(SDL_keysym Sym)
{ {
// This part was removed from the MacOSX port, but I put it back for others
// as on Linux and Windows, it's what allows editing a text line with the keys
// SDLK_LEFT, SDLK_RIGHT, SDLK_HOME, SDLK_END etc.
#ifndef __MACOSX__
if ( Sym.unicode == 0)
{
return Sym.sym;
}
#endif
//
if ( Sym.unicode > 32 && Sym.unicode < 127) if ( Sym.unicode > 32 && Sym.unicode < 127)
{ {
return Sym.unicode; // Pas de souci, on est en ASCII standard return Sym.unicode; // Pas de souci, on est en ASCII standard