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:
parent
038d1bc0f6
commit
575d9e3be5
@ -1257,6 +1257,7 @@ void Button_Skins(void)
|
|||||||
int selected_cursor = Config.Cursor;
|
int selected_cursor = Config.Cursor;
|
||||||
byte separatecolors = Config.Separate_colors;
|
byte separatecolors = Config.Separate_colors;
|
||||||
byte showlimits = Config.Display_image_limits;
|
byte showlimits = Config.Display_image_limits;
|
||||||
|
byte need_load=1;
|
||||||
|
|
||||||
word x, y, x_pos, offs_y;
|
word x, y, x_pos, offs_y;
|
||||||
|
|
||||||
@ -1345,20 +1346,11 @@ void Button_Skins(void)
|
|||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
clicked_button=Window_clicked_button();
|
if (need_load)
|
||||||
if (Is_shortcut(Key,0x100+BUTTON_HELP))
|
|
||||||
Window_help(BUTTON_SETTINGS, "SKINS");
|
|
||||||
|
|
||||||
switch(clicked_button)
|
|
||||||
{
|
{
|
||||||
case 1 : // OK
|
need_load=0;
|
||||||
break;
|
|
||||||
case 2 : // doesn't happen
|
|
||||||
break;
|
|
||||||
case 3 : // doesn't happen
|
|
||||||
break;
|
|
||||||
case 4 : // a file is selected
|
|
||||||
|
|
||||||
|
Hide_cursor();
|
||||||
// (Re-)load GUI graphics from selected skins
|
// (Re-)load GUI graphics from selected skins
|
||||||
strcpy(skinsdir, Get_item_by_index(&Skin_files_list,
|
strcpy(skinsdir, Get_item_by_index(&Skin_files_list,
|
||||||
skin_list->List_start + skin_list->Cursor_position)->Full_name);
|
skin_list->List_start + skin_list->Cursor_position)->Full_name);
|
||||||
@ -1366,7 +1358,9 @@ void Button_Skins(void)
|
|||||||
gfx = Load_graphics(skinsdir);
|
gfx = Load_graphics(skinsdir);
|
||||||
if (gfx == NULL) // Error
|
if (gfx == NULL) // Error
|
||||||
{
|
{
|
||||||
|
Display_cursor();
|
||||||
Verbose_message("Error!", Gui_loading_error_message);
|
Verbose_message("Error!", Gui_loading_error_message);
|
||||||
|
Hide_cursor();
|
||||||
// Update preview
|
// Update preview
|
||||||
Window_rectangle(6, 14, 173, 16, MC_Light);
|
Window_rectangle(6, 14, 173, 16, MC_Light);
|
||||||
}
|
}
|
||||||
@ -1411,7 +1405,23 @@ void Button_Skins(void)
|
|||||||
gfx->Default_palette[gfx->Color[3]].B);
|
gfx->Default_palette[gfx->Color[3]].B);
|
||||||
}
|
}
|
||||||
Update_window_area(6, 14, 173, 16);
|
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;
|
break;
|
||||||
case 5 : // Font dropdown
|
case 5 : // Font dropdown
|
||||||
selected_font = Window_attribute2; // Get the index of the chosen font.
|
selected_font = Window_attribute2; // Get the index of the chosen font.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user