Skins screen now immediately load the screen from disk when you enter it. When editing skin from within Grafx2, this means you can immediately press enter or click OK to update and see change.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1498 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
@@ -1257,6 +1257,7 @@ void Button_Skins(void)
|
||||
int selected_cursor = Config.Cursor;
|
||||
byte separatecolors = Config.Separate_colors;
|
||||
byte showlimits = Config.Display_image_limits;
|
||||
byte need_load=1;
|
||||
|
||||
word x, y, x_pos, offs_y;
|
||||
|
||||
@@ -1345,20 +1346,11 @@ void Button_Skins(void)
|
||||
|
||||
do
|
||||
{
|
||||
clicked_button=Window_clicked_button();
|
||||
if (Is_shortcut(Key,0x100+BUTTON_HELP))
|
||||
Window_help(BUTTON_SETTINGS, "SKINS");
|
||||
|
||||
switch(clicked_button)
|
||||
if (need_load)
|
||||
{
|
||||
case 1 : // OK
|
||||
break;
|
||||
case 2 : // doesn't happen
|
||||
break;
|
||||
case 3 : // doesn't happen
|
||||
break;
|
||||
case 4 : // a file is selected
|
||||
need_load=0;
|
||||
|
||||
Hide_cursor();
|
||||
// (Re-)load GUI graphics from selected skins
|
||||
strcpy(skinsdir, Get_item_by_index(&Skin_files_list,
|
||||
skin_list->List_start + skin_list->Cursor_position)->Full_name);
|
||||
@@ -1366,7 +1358,9 @@ void Button_Skins(void)
|
||||
gfx = Load_graphics(skinsdir);
|
||||
if (gfx == NULL) // Error
|
||||
{
|
||||
Display_cursor();
|
||||
Verbose_message("Error!", Gui_loading_error_message);
|
||||
Hide_cursor();
|
||||
// Update preview
|
||||
Window_rectangle(6, 14, 173, 16, MC_Light);
|
||||
}
|
||||
@@ -1411,7 +1405,23 @@ void Button_Skins(void)
|
||||
gfx->Default_palette[gfx->Color[3]].B);
|
||||
}
|
||||
Update_window_area(6, 14, 173, 16);
|
||||
Display_cursor();
|
||||
}
|
||||
|
||||
clicked_button=Window_clicked_button();
|
||||
if (Is_shortcut(Key,0x100+BUTTON_HELP))
|
||||
Window_help(BUTTON_SETTINGS, "SKINS");
|
||||
|
||||
switch(clicked_button)
|
||||
{
|
||||
case 1 : // OK
|
||||
break;
|
||||
case 2 : // doesn't happen
|
||||
break;
|
||||
case 3 : // doesn't happen
|
||||
break;
|
||||
case 4 : // a file is selected
|
||||
need_load=1;
|
||||
break;
|
||||
case 5 : // Font dropdown
|
||||
selected_font = Window_attribute2; // Get the index of the chosen font.
|
||||
|
||||
Reference in New Issue
Block a user