Skin preview previews gui colors
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1123 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
25
init.c
25
init.c
@@ -2472,3 +2472,28 @@ void Init_brush_container(void)
|
||||
Brush_container[i].Brush = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void Set_current_skin(const char *skinfile, T_Gui_skin *gfx)
|
||||
{
|
||||
// Free previous one
|
||||
free(Gfx);
|
||||
|
||||
// Assign main skin pointer
|
||||
Gfx = gfx;
|
||||
|
||||
// Change config
|
||||
free(Config.Skin_file);
|
||||
Config.Skin_file = strdup(skinfile);
|
||||
|
||||
Config.Fav_menu_colors[0] = gfx->Default_palette[gfx->Color_black];
|
||||
Config.Fav_menu_colors[1] = gfx->Default_palette[gfx->Color_dark];
|
||||
Config.Fav_menu_colors[2] = gfx->Default_palette[gfx->Color_light];
|
||||
Config.Fav_menu_colors[3] = gfx->Default_palette[gfx->Color_white];
|
||||
|
||||
// Reassign GUI color indices
|
||||
MC_Black = gfx->Color_black;
|
||||
MC_Dark = gfx->Color_dark;
|
||||
MC_Light = gfx->Color_light;
|
||||
MC_White = gfx->Color_white;
|
||||
MC_Trans = gfx->Color_trans;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user