Settings: Can now input numbers. Helpfile redone from scratch. Can use mouse wheel.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1462 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud 2010-04-24 18:49:44 +00:00
parent 9b0a160ffb
commit f06dbc1389
3 changed files with 380 additions and 175 deletions

View File

@ -704,6 +704,8 @@ void Button_Clear_with_backcolor(void)
//------------------------------- Paramètres ---------------------------------
#define SETTING_PER_PAGE 11
#define SETTING_PAGES 5
#define SETTING_HEIGHT 12
typedef struct {
@ -756,6 +758,40 @@ typedef struct {
const T_Lookup * Lookup;
} T_Setting;
long int Get_setting_value(T_Setting *item)
{
switch(item->Type)
{
case 1:
return *((byte *)(item->Value));
break;
case 2:
return *((word *)(item->Value));
break;
case 4:
default:
return *((long int *)(item->Value));
break;
}
}
void Set_setting_value(T_Setting *item, long int value)
{
switch(item->Type)
{
case 1:
*((byte *)(item->Value)) = value;
break;
case 2:
*((word *)(item->Value)) = value;
break;
case 4:
default:
*((long int *)(item->Value)) = value;
break;
}
}
// Fetch a label in a lookup table. Unknown values get label 0.
const char *Lookup_code(int code, const T_Lookup *lookup)
{
@ -801,21 +837,8 @@ void Settings_display_config(T_Setting *setting, T_Config * conf, T_Special_butt
Print_in_window(panel->Pos_X+3, panel->Pos_Y+i*SETTING_HEIGHT+3, setting[i].Label, i==0?MC_White:MC_Dark, MC_Light);
if(setting[i].Value)
{
// Fetch value
int value;
switch(setting[i].Type)
{
case 1:
value = *((byte *)(setting[i].Value));
break;
case 2:
value = *((word *)(setting[i].Value));
break;
case 4:
default:
value = *((long int *)(setting[i].Value));
break;
}
int value = Get_setting_value(&setting[i]);
if (setting[i].Lookup)
{
@ -827,7 +850,7 @@ void Settings_display_config(T_Setting *setting, T_Config * conf, T_Special_butt
else
{
// Print a number
char str[29];
char str[10];
Num2str(value,str,setting[i].Digits);
Print_in_window(panel->Pos_X+3+176, panel->Pos_Y+i*SETTING_HEIGHT+3, str, MC_Black, MC_Light);
}
@ -865,7 +888,47 @@ void Button_Settings(void)
static byte current_page=0;
// Definition of settings pages
T_Setting setting[] = {
// Label,Type (0 = label, 1+ = setting size in bytes),
// Value, min, max, digits, Lookup)
T_Setting setting[SETTING_PER_PAGE*SETTING_PAGES] = {
{" --- GUI ---",0,NULL,0,0,0,NULL},
{"",0,NULL,0,0,0,NULL},
{"Opening message:",1,&(Config_choisie.Opening_message),0,1,0,Lookup_YesNo},
{"Menu ratio adapt:",1,&(Config_choisie.Ratio),0,1,0,Lookup_MenuRatio},
{"Draw limits:",1,&(Config_choisie.Display_image_limits),0,1,0,Lookup_YesNo},
{"Coordinates:",1,&(Config_choisie.Coords_rel),0,1,0,Lookup_Coords},
{"Separate colors:",1,&(Config_choisie.Separate_colors),0,1,0,Lookup_YesNo},
{"Safety colors:",1,&(Config_choisie.Safety_colors),0,1,0,Lookup_YesNo},
{"Grid XOR color:",1,&(Config_choisie.Grid_XOR_color),0,255,3,NULL},
{"",0,NULL,0,0,0,NULL},
{"",0,NULL,0,0,0,NULL},
{" --- Input ---",0,NULL,0,0,0,NULL},
{"",0,NULL,0,0,0,NULL},
{"Scrollbar speed",0,NULL,0,0,0,NULL},
{" on left click:",1,&(Config_choisie.Delay_left_click_on_slider),1,255,4,NULL},
{" on right click:",1,&(Config_choisie.Delay_right_click_on_slider),1,255,4,NULL},
{"Merge movement:",1,&(Config_choisie.Mouse_merge_movement),0,100,4,NULL},
{"Double click speed:",2,&(Config_choisie.Double_click_speed),1,1999,4,NULL},
{"Double key speed:",2,&(Config_choisie.Double_key_speed),1,1999,4,NULL},
{"",0,NULL,0,0,0,NULL},
{"",0,NULL,0,0,0,NULL},
{"",0,NULL,0,0,0,NULL},
{" --- Editing ---",0,NULL,0,0,0,NULL},
{"",0,NULL,0,0,0,NULL},
{"Adjust brush pick:",1,&(Config_choisie.Adjust_brush_pick),0,1,0,Lookup_YesNo},
{"Undo pages:",1,&(Config_choisie.Max_undo_pages),1,99,5,NULL},
{"Vertices per polygon:",4,&(Config_choisie.Nb_max_vertices_per_polygon),2,16384,5,NULL},
{"Fast zoom:",1,&(Config_choisie.Fast_zoom),0,1,0,Lookup_YesNo},
{"Clear with stencil:",1,&(Config_choisie.Clear_with_stencil),0,1,0,Lookup_YesNo},
{"Auto discontinuous:",1,&(Config_choisie.Auto_discontinuous),0,1,0,Lookup_YesNo},
{"Auto count colors:",1,&(Config_choisie.Auto_nb_used),0,1,0,Lookup_YesNo},
{"",0,NULL,0,0,0,NULL},
{"",0,NULL,0,0,0,NULL},
{" --- File selector ---",0,NULL,0,0,0,NULL},
{"",0,NULL,0,0,0,NULL},
{"Show in fileselector",0,NULL,0,0,0,NULL},
@ -890,44 +953,16 @@ void Button_Settings(void)
{"",0,NULL,0,0,0,NULL},
{"",0,NULL,0,0,0,NULL},
{" --- GUI ---",0,NULL,0,0,0,NULL},
{"",0,NULL,0,0,0,NULL},
{"Opening message:",1,&(Config_choisie.Opening_message),0,1,0,Lookup_YesNo},
{"Menu ratio adapt:",1,&(Config_choisie.Ratio),0,1,0,Lookup_MenuRatio},
{"Draw limits:",1,&(Config_choisie.Display_image_limits),0,1,0,Lookup_YesNo},
{"Coordinates:",1,&(Config_choisie.Coords_rel),0,1,0,Lookup_Coords},
{"Separate colors:",1,&(Config_choisie.Separate_colors),0,1,0,Lookup_YesNo},
{"Safety colors:",1,&(Config_choisie.Safety_colors),0,1,0,Lookup_YesNo},
{"Grid XOR color:",1,&(Config_choisie.Grid_XOR_color),0,255,3,NULL},
{"",0,NULL,0,0,0,NULL},
{"",0,NULL,0,0,0,NULL},
{" --- Input ---",0,NULL,0,0,0,NULL},
{"",0,NULL,0,0,0,NULL},
{"Scrollbar speed",0,NULL,0,0,0,NULL},
{" on left click:",1,&(Config_choisie.Delay_left_click_on_slider),1,255,3,NULL},
{" on right click:",1,&(Config_choisie.Delay_right_click_on_slider),1,255,3,NULL},
{"Merge movement:",1,&(Config_choisie.Mouse_merge_movement),0,100,3,NULL},
{"Double click speed:",2,&(Config_choisie.Double_click_speed),1,1999,4,NULL},
{"Double key speed:",2,&(Config_choisie.Double_key_speed),1,1999,4,NULL},
{"",0,NULL,0,0,0,NULL},
{"",0,NULL,0,0,0,NULL},
{"",0,NULL,0,0,0,NULL},
{" --- Editing ---",0,NULL,0,0,0,NULL},
{"",0,NULL,0,0,0,NULL},
{"Adjust brush pick:",1,&(Config_choisie.Adjust_brush_pick),0,1,0,Lookup_YesNo},
{"Undo pages:",1,&(Config_choisie.Max_undo_pages),1,99,2,NULL},
{"Vertices per polygon:",4,&(Config_choisie.Nb_max_vertices_per_polygon),2,16384,5,NULL},
{"Fast zoom:",1,&(Config_choisie.Fast_zoom),0,1,0,Lookup_YesNo},
{"Clear with stencil:",1,&(Config_choisie.Clear_with_stencil),0,1,0,Lookup_YesNo},
{"Auto discontinuous:",1,&(Config_choisie.Auto_discontinuous),0,1,0,Lookup_YesNo},
{"Auto count colors:",1,&(Config_choisie.Auto_nb_used),0,1,0,Lookup_YesNo},
{"",0,NULL,0,0,0,NULL},
{"",0,NULL,0,0,0,NULL},
};
const char * help_section[SETTING_PAGES] = {
"GUI",
"INPUT",
"EDITING"
"FILE SELECTOR",
"FILE FORMAT OPTIONS",
};
Config_choisie=Config;
@ -943,7 +978,7 @@ void Button_Settings(void)
Window_set_normal_button(250,163, 51,14,"Close" ,0,1,KEY_ESC); // 4
panel=Window_set_special_button(10, 21, 272,SETTING_PER_PAGE*SETTING_HEIGHT); // 5
Window_set_scroller_button(285,21,SETTING_PER_PAGE*SETTING_HEIGHT,sizeof(setting)/sizeof(setting[0])/SETTING_PER_PAGE,1,current_page); // 6
Window_set_scroller_button(285,21,SETTING_PER_PAGE*SETTING_HEIGHT,SETTING_PAGES,1,current_page); // 6
Update_window_area(0,0,Window_width, Window_height);
Display_cursor();
@ -952,7 +987,17 @@ void Button_Settings(void)
{
if (need_redraw)
{
Hide_cursor();
Settings_display_config(setting+current_page*SETTING_PER_PAGE, &Config_choisie, panel);
if (need_redraw & 2)
{
// Including slider position
Window_scroller_button_list->Position=current_page;
Window_draw_slider(Window_scroller_button_list);
}
Display_cursor();
need_redraw=0;
}
@ -985,39 +1030,37 @@ void Button_Settings(void)
item=setting[current_page*SETTING_PER_PAGE+num];
if (item.Type!=0)
{
// Remember which button is clicked
byte old_mouse_k = Mouse_K;
if (Window_normal_button_onclick(panel->Pos_X, panel->Pos_Y+num*SETTING_HEIGHT+1, panel->Width, SETTING_HEIGHT, 5))
{
// Fetch value
int value;
switch(item.Type)
{
case 1:
value = *((byte *)(item.Value));
break;
case 2:
value = *((word *)(item.Value));
break;
case 4:
default:
value = *((long int *)(item.Value));
break;
}
int value = Get_setting_value(&item);
if (item.Lookup)
{
// Enum: toggle it
value = Lookup_toggle(value, item.Lookup);
switch(item.Type)
{
case 1:
*((byte *)(item.Value)) = value;
break;
case 2:
*((word *)(item.Value)) = value;
break;
case 4:
default:
*((long int *)(item.Value)) = value;
break;
Set_setting_value(&item, value);
}
else
{
// Numeric: edit it
char str[10];
str[0]='\0';
if (! (old_mouse_k & RIGHT_SIDE))
Num2str(value,str,item.Digits+1);
if (Readline(panel->Pos_X+3+176, panel->Pos_Y+num*SETTING_HEIGHT+3,str,item.Digits+1,1))
{
value=atoi(str);
if (value<item.Min_value)
value = item.Min_value;
else if (value>item.Max_value)
value = item.Max_value;
Set_setting_value(&item, value);
}
Key=0; // Need to discard keys used during editing
}
}
}
@ -1042,8 +1085,24 @@ void Button_Settings(void)
Spare_fileselector_offset=0;
}*/
if (Is_shortcut(Key,0x100+BUTTON_HELP))
Window_help(BUTTON_SETTINGS, NULL);
if (Key == KEY_MOUSEWHEELDOWN)
{
if (current_page < (SETTING_PAGES-1))
{
current_page++;
need_redraw=2;
}
}
else if (Key == KEY_MOUSEWHEELUP)
{
if (current_page > 0)
{
current_page--;
need_redraw=2;
}
}
else if (Is_shortcut(Key,0x100+BUTTON_HELP))
Window_help(NB_BUTTONS+0, help_section[current_page]);
else if (Is_shortcut(Key,0x100+BUTTON_SETTINGS))
clicked_button=4;
}

View File

@ -2083,99 +2083,11 @@ static const T_Help_table helptable_settings[] =
HELP_LINK ("(Key:%s)",0x100+BUTTON_SETTINGS)
HELP_TEXT ("")
HELP_TEXT ("Displays a menu where you can configure some")
HELP_TEXT ("miscellaneous elements of the program:")
HELP_TEXT ("miscellaneous elements of the program.")
HELP_TEXT ("Detailed description of each setting is")
HELP_TEXT ("available when this screen is open (Use the")
HELP_LINK ("%s key.",0x100+BUTTON_HELP)
HELP_TEXT ("")
HELP_TEXT ("- Number of UNDO pages: indicates the total")
HELP_TEXT ("number of pages that GrafX2 will memorize.")
HELP_TEXT ("Each time you modify the picture, its")
HELP_TEXT ("current state is memorized in one of these")
HELP_TEXT ("pages. To flick through these pages, use the")
HELP_TEXT ("\"Oops\" button (Undo/Redo).")
HELP_TEXT ("")
HELP_TEXT ("- Mouse sensibility: Modifies the speed of")
HELP_TEXT ("the mouse when you're in fullscreen. With")
HELP_TEXT ("the normal setting (slider on top), you may")
HELP_TEXT ("find the mouse too fast, especially in ")
HELP_TEXT ("video modes which are much smaller than your")
HELP_TEXT ("desktop. You can lower the slider to divide")
HELP_TEXT ("the speed by 2, 3 or 4.")
HELP_TEXT ("When using videomodes with native skewed")
HELP_TEXT ("pixels like 640x240 or 320x512, you'll")
HELP_TEXT ("probably want to use a stronger reduction")
HELP_TEXT ("on the axis which has less pixels.")
HELP_TEXT ("")
HELP_TEXT ("- Show/Hide in file list: Defines whether")
HELP_TEXT ("some particular files or directories must be")
HELP_TEXT ("displayed by the fileselectors or not.")
HELP_TEXT ("")
HELP_TEXT ("- Clear palette: Indicates if loading a file")
HELP_TEXT ("with a palette of less than 256 colors must")
HELP_TEXT ("erase the rest of the current palette")
HELP_TEXT ("(replace by the black color).")
HELP_TEXT ("")
HELP_TEXT ("- Maximize preview: maximizes the preview of")
HELP_TEXT ("the pictures so that it is as big as")
HELP_TEXT ("possible. If you're not in the same")
HELP_TEXT ("resolution as the picture's one, it can try")
HELP_TEXT ("to correct the aspect ratio, but if the")
HELP_TEXT ("picture does not fill the whole screen, it")
HELP_TEXT ("can be worse.")
HELP_TEXT ("")
HELP_TEXT ("- Backup: when you'll save a picture over an")
HELP_TEXT ("existing file, the program will rename this")
HELP_TEXT ("file to \"*.BAK\" where * is the name of the")
HELP_TEXT ("picture without its extension. If the backup")
HELP_TEXT ("file already exists in the directory, it")
HELP_TEXT ("will be replaced. If you save a picture with")
HELP_TEXT ("the name of the backup file, no backup file")
HELP_TEXT ("will be created (of course!) ;).")
HELP_TEXT ("")
HELP_TEXT ("- Safety colors: Brings back the 4 default")
HELP_TEXT ("colors of the menus if you run an operation")
HELP_TEXT ("that passes the image in less than four")
HELP_TEXT ("colors in the palette editor.")
HELP_TEXT ("")
HELP_TEXT ("- Adjust brush pick: This option is used")
HELP_TEXT ("when you grab a brush in Grid (Snap) mode.")
HELP_TEXT ("Then, the right-most and down-most pixels")
HELP_TEXT ("won't be picked up with the rest of the")
HELP_TEXT ("brush. This option has been made because, if")
HELP_TEXT ("people grab brushes in Grid mode, that's")
HELP_TEXT ("mostly when they want to grab sprites. For")
HELP_TEXT ("example: if you have 16x16 sprites on your")
HELP_TEXT ("page, you'll set the grid mode to 16x16. But")
HELP_TEXT ("the cursor will snap at points like (0,0),")
HELP_TEXT ("(16,0), (16,16) and so on... And the problem")
HELP_TEXT ("is that, from (0,0) to (16,16), there are 17")
HELP_TEXT ("pixels! But if you keep the")
HELP_TEXT ("adjust-brush-pick option on, the unwanted")
HELP_TEXT ("pixels will be ignored. Moreover, this")
HELP_TEXT ("option adjusts the brush handle so that the")
HELP_TEXT ("brush still fits in the grid, instead of")
HELP_TEXT ("placing the handle in the center of the")
HELP_TEXT ("brush.")
HELP_TEXT ("")
HELP_TEXT ("- Auto-set resolution: sets the best")
HELP_TEXT ("resolution for the loaded image.")
HELP_TEXT ("")
HELP_TEXT ("- Coordinates: Choose if you want to display")
HELP_TEXT ("relative or absolute coordinates when using")
HELP_TEXT ("tools such as circles, rectangles, etc...")
HELP_TEXT ("for example, if you draw a circle: if coords")
HELP_TEXT ("are relative, the radius of the circle will")
HELP_TEXT ("be displayed, while in absolute coords, the")
HELP_TEXT ("coordinates of the cursor will be displayed.")
HELP_TEXT ("")
HELP_TEXT ("- Reload: loads the previously saved")
HELP_TEXT ("configuration.")
HELP_TEXT ("")
HELP_TEXT ("- Auto-save: means that the configuration")
HELP_TEXT ("will be automatically saved when you'll quit")
HELP_TEXT ("the program.")
HELP_TEXT ("")
HELP_TEXT ("- Save: saves the configuration at once.")
HELP_TEXT (" All modifications will be effective just")
HELP_TEXT ("after closing the menu.")
HELP_TEXT ("")
HELP_TITLE("SKINS")
HELP_TEXT ("")
@ -2211,6 +2123,230 @@ static const T_Help_table helptable_settings[] =
HELP_TEXT ("picture.")
HELP_TEXT ("")
};
static const T_Help_table helptable_settings_details[] =
{
HELP_TITLE("DETAILED SETTINGS")
HELP_TEXT ("")
HELP_TITLE("FILE SELECTOR")
HELP_TEXT ("")
HELP_TEXT ("")
HELP_BOLD (" Show hidden files")
HELP_TEXT ("Hidden files appear.")
HELP_TEXT ("")
HELP_BOLD (" Show hidden directories")
HELP_TEXT ("Hidden directories appear.")
HELP_TEXT ("")
HELP_BOLD (" Preview delay")
HELP_TEXT ("Delay before displaying a preview in file-")
HELP_TEXT ("selectors (in 18.2th of second). Possible")
HELP_TEXT ("values range from 1 to 256.")
HELP_TEXT ("")
HELP_BOLD (" Maximize preview")
HELP_TEXT ("Maximize the preview of the pictures so that")
HELP_TEXT ("it is as big as possible. If you're not in")
HELP_TEXT ("the same resolution as the picture's one, it")
HELP_TEXT ("can try to correct the aspect ratio, but if")
HELP_TEXT ("the picture does not fill the whole screen,")
HELP_TEXT ("it can be worse.")
HELP_TEXT ("")
HELP_BOLD (" Find file fast")
HELP_TEXT ("This option is used to place the selection")
HELP_TEXT ("bar on a filename by typing its first")
HELP_TEXT ("letters. For example, if you want to find")
HELP_TEXT ("the 'PICTURE.PKM' in a directory that also")
HELP_TEXT ("contains 'PALETTE.PAL', you'll just have to")
HELP_TEXT ("type P and I. The different values of 'FFF'")
HELP_TEXT ("indicate if you want to find the name in")
HELP_TEXT ("both files and directories or just in only")
HELP_TEXT ("one of these:")
HELP_TEXT ("0: files and directories")
HELP_TEXT ("1: files only")
HELP_TEXT ("2: directories only")
HELP_TEXT ("")
HELP_BOLD (" Auto set resolution")
HELP_TEXT ("Automatically set the resolution when")
HELP_TEXT ("loading a picture. You should set this value")
HELP_TEXT ("to 'yes' after disabling the video modes")
HELP_TEXT ("that are notsupported by your video card or")
HELP_TEXT ("monitor.")
HELP_TEXT ("")
HELP_BOLD (" Set resolution according to")
HELP_TEXT ("If the variable above is set to 'yes', this")
HELP_TEXT ("one tells if you want to set the resolution")
HELP_TEXT ("according to:")
HELP_TEXT ("1: the internal 'original screen' dimensions")
HELP_TEXT (" of the picture")
HELP_TEXT ("2: the actual dimensions of the picture")
HELP_TEXT (" ")
HELP_BOLD (" Backup")
HELP_TEXT ("Create a backup file when saving.")
HELP_TEXT ("")
HELP_TEXT ("")
HELP_TITLE("FILE FORMAT OPTIONS")
HELP_TEXT ("")
HELP_TEXT ("")
HELP_BOLD (" Save screen size in GIF")
HELP_TEXT ("Save the screen dimensions in GIF files. If")
HELP_TEXT ("you want to read these files with Photoshop")
HELP_TEXT ("or Alchemy, and maybe some other programs,")
HELP_TEXT ("you must set this option to 'no'.")
HELP_TEXT ("")
HELP_BOLD (" Clear palette")
HELP_TEXT ("If you load a picture with a palette of less")
HELP_TEXT ("than 256 colors, this option defines if you")
HELP_TEXT ("want to clear the palette or to keep the")
HELP_TEXT ("colors of the previous picture that are over")
HELP_TEXT ("the number of colors of the new picture.")
HELP_TEXT ("For example, if you load a 32-color picture,")
HELP_TEXT ("the colors 32 to 255 will be set to black if")
HELP_TEXT ("this option is set to 'yes', or they will be")
HELP_TEXT ("kept unchanged if this option is set to 'no'")
HELP_TEXT ("")
HELP_TEXT ("")
HELP_TITLE("GUI")
HELP_TEXT ("")
HELP_TEXT ("")
HELP_BOLD (" Opening message")
HELP_TEXT ("Display a message at startup telling the")
HELP_TEXT ("version number of the program.")
HELP_TEXT ("")
HELP_BOLD (" Menu ratio")
HELP_TEXT ("Aspect ratio and size of the menus and the")
HELP_TEXT ("tool-bar.")
HELP_TEXT ("Possible values:")
HELP_TEXT ("0: Do not adapt (pixels are not stretched)")
HELP_TEXT ("1: Adapt the menus and the tool-bar")
HELP_TEXT (" according to the resolution")
HELP_TEXT ("2: Slightly adapt the ratio of the menus and")
HELP_TEXT (" tool-bar")
HELP_TEXT ("-1:Do not adapt (like 0)")
HELP_TEXT ("-2:Stretch by x2 maximum")
HELP_TEXT ("-3:Stretch by x3 maximum")
HELP_TEXT ("-4:Stretch by x4 maximum")
HELP_TEXT ("")
HELP_BOLD (" Draw limits")
HELP_TEXT ("Draw the limits of the picture.")
HELP_TEXT ("")
HELP_BOLD (" Coordinates")
HELP_TEXT ("Coordinates:")
HELP_TEXT ("1: Relative")
HELP_TEXT ("2: Absolute")
HELP_TEXT ("")
HELP_BOLD (" Separate colors")
HELP_TEXT ("Separate the colors in the tool-bar by a")
HELP_TEXT ("black squaring.")
HELP_TEXT ("")
HELP_BOLD (" Safety colors")
HELP_TEXT ("When you reduce the palette or 'zap' some")
HELP_TEXT ("colors out of it, it is possible that there")
HELP_TEXT ("are not enough colors left to draw the")
HELP_TEXT ("menus. Switching the following variable on")
HELP_TEXT ("will bring back the colors of the menu if")
HELP_TEXT ("there are less than 4 colors left after")
HELP_TEXT ("'reducing' or 'zapping'.")
HELP_TEXT ("")
HELP_BOLD (" Grid XOR color")
HELP_TEXT ("This determines the color value for the")
HELP_TEXT ("grid. Each pixel of the grid will be")
HELP_TEXT ("displayed by XOR-ing the original color with")
HELP_TEXT ("the value of this setting.")
HELP_TEXT ("For example, if you always paint 16-color")
HELP_TEXT ("images, you can set it to 16 so the color of")
HELP_TEXT ("the grid are 16 for 0, 17 for 1, etc. Then")
HELP_TEXT ("you can set colors 16-31 as lighter/darker")
HELP_TEXT ("variants of your original palette, resulting")
HELP_TEXT ("in a pretty grid !")
HELP_TEXT ("")
HELP_TEXT ("")
HELP_TITLE("INPUT")
HELP_TEXT ("")
HELP_TEXT ("")
HELP_BOLD (" Gauges scrolling speed Left")
HELP_TEXT ("Speed of the scroll-bars (in VBLs waited)")
HELP_TEXT ("while clicking with the left or right button")
HELP_TEXT ("of the mouse.")
HELP_TEXT ("Values can be between 1 and 255. The bigger")
HELP_TEXT ("values, the slower.")
HELP_TEXT ("")
HELP_BOLD (" Gauges scrolling speed Right")
HELP_TEXT ("Speed of the scroll-bars (in VBLs waited)")
HELP_TEXT ("while clicking with the left or right button")
HELP_TEXT ("of the mouse.")
HELP_TEXT ("Values can be between 1 and 255. The bigger")
HELP_TEXT ("values, the slower.")
HELP_TEXT ("")
HELP_BOLD (" Merge movement")
HELP_TEXT ("This setting allows you merge successive")
HELP_TEXT ("mouse movements into a single mouse")
HELP_TEXT ("movement. You should only use it if you are")
HELP_TEXT ("using a mouse which reports at 200Hz or")
HELP_TEXT ("more, and you experience lag when using")
HELP_TEXT ("discontinuous hand-drawing with large")
HELP_TEXT ("brushes (this tool tries to paste the brush")
HELP_TEXT ("and update the screen on each new mouse")
HELP_TEXT ("position) In this case, set this to 2 or")
HELP_TEXT ("more, to ignore some intermediate mouse")
HELP_TEXT ("reports when a more recent one is present.")
HELP_TEXT ("Note that with a value superior to 1, you")
HELP_TEXT ("lose precision with continuous hand-drawing,")
HELP_TEXT ("as intermediate mouse positions are skipped.")
HELP_TEXT ("")
HELP_BOLD (" Double click speed")
HELP_TEXT ("This is the time (in milliseconds) between")
HELP_TEXT ("two clicks for Grafx2 to recognize a")
HELP_TEXT ("double-click. Double-click is used mostly in")
HELP_TEXT ("the palette area of the menu: double-click a")
HELP_TEXT ("color to open the palette.")
HELP_TEXT ("")
HELP_BOLD (" Double key speed")
HELP_TEXT ("When you press two digit keys in rapid")
HELP_TEXT ("succession (ex: 3 8), Grafx2 sets")
HELP_TEXT ("transparency to 38% (instead of 30% then")
HELP_TEXT ("80%). This setting allows you to set the")
HELP_TEXT ("maximum delay between two keypresses for")
HELP_TEXT ("GrafX2 to recognize them as a combo.")
HELP_TEXT ("")
HELP_TEXT ("")
HELP_TITLE("EDITING")
HELP_TEXT ("")
HELP_TEXT ("")
HELP_BOLD (" Adjust brush pick")
HELP_TEXT ("Adjust the brush grabbing in 'grid' mode.")
HELP_TEXT ("")
HELP_BOLD (" Undo pages")
HELP_TEXT ("Number of pages stored in memory for")
HELP_TEXT ("'undoing'.")
HELP_TEXT ("Values are between 1 and 99.")
HELP_TEXT ("")
HELP_BOLD (" Vertices per polygon")
HELP_TEXT ("Maximum number of vertices used in filled")
HELP_TEXT ("polygons and polyforms, and lasso. Possible")
HELP_TEXT ("values range from 2 to 16384.")
HELP_TEXT ("")
HELP_BOLD (" Fast zoom")
HELP_TEXT ("Automatically zoom into the pointed area")
HELP_TEXT ("when you press the short-key of the")
HELP_TEXT ("Magnifier button while being above the")
HELP_TEXT ("picture.")
HELP_TEXT ("")
HELP_BOLD (" Clear with stencil")
HELP_TEXT ("Take the Stencil into account when clearing")
HELP_TEXT ("the image.")
HELP_TEXT ("")
HELP_BOLD (" Auto discontinuous")
HELP_TEXT ("Directly set the discontinuous freehand")
HELP_TEXT ("drawing mode after brush grabbing.")
HELP_TEXT ("")
HELP_BOLD (" Auto nb colors used")
HELP_TEXT ("Automaticaly count the number of different")
HELP_TEXT ("colors used when opening the palette editor")
HELP_TEXT ("window. (Set it to 'no' if you have a slow")
HELP_TEXT ("computer or if you edit huge pictures)")
HELP_TEXT ("")
HELP_TEXT ("")
};
static const T_Help_table helptable_clear[] =
{
@ -2696,4 +2832,14 @@ T_Help_section Help_section[] =
HELP_TABLE_DECLARATION(helptable_pal_scroll)
HELP_TABLE_DECLARATION(helptable_pal_scroll)
HELP_TABLE_DECLARATION(helptable_color_select)
// End of buttons list
// NB_BUTTONS+0
HELP_TABLE_DECLARATION(helptable_settings_details)
// NB_BUTTONS+1
// HELP_TABLE_DECLARATION()
// NB_BUTTONS+2
// HELP_TABLE_DECLARATION()
// ...
};

View File

@ -149,7 +149,7 @@ byte Readline_ex(word x_pos,word y_pos,char * str,byte visible_size,byte max_siz
// Si on a commencé à editer par un clic-droit, on vide la chaine.
if (Mouse_K==RIGHT_SIDE)
str[0]='\0';
else if (input_type==1)
else if (input_type==1 && str[0]!='\0')
snprintf(str,10,"%d",atoi(str)); // On tasse la chaine à gauche
else if (input_type==3)
{