WIP: "Load" button in Palette Dialog

see http://pulkomandy.tk/projects/GrafX2/ticket/24

still some issues :

1) UI color remapping

2) File type selector (need to add a Palette selector
in addition to the Main and Brush selector)
This commit is contained in:
Thomas Bernard
2017-12-20 14:59:09 +01:00
parent ccf3e6a77f
commit 2d26bb8a1f
3 changed files with 21 additions and 1 deletions

View File

@@ -855,6 +855,18 @@ void Load_image(T_IO_Context *context)
Download_infos_page_main(Main.backups->Pages);
}
}
else if (context->Type == CONTEXT_PALETTE)
{
if ( File_error!=1)
{
Set_palette(context->Palette);
// Make a backup step
Backup_layers(LAYER_NONE);
// Copy the loaded palette
memcpy(Main_palette, context->Palette, sizeof(T_Palette));
//memcpy(Main_backups->Pages->Palette, context->Palette, sizeof(T_Palette));
}
}
else if (context->Type == CONTEXT_BRUSH && File_error==0)
{