Layer toolbar visible by default. Grafx2 now records which toolbars are visible on exit, and restores them next time.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1327 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
24
init.c
24
init.c
@@ -2657,3 +2657,27 @@ void Set_current_skin(const char *skinfile, T_Gui_skin *gfx)
|
||||
Menu_bars[MENUBAR_LAYERS].Skin = (byte*)&(gfx->Layerbar_block);
|
||||
Menu_bars[MENUBAR_STATUS].Skin = (byte*)&(gfx->Statusbar_block);
|
||||
}
|
||||
|
||||
///
|
||||
/// Based on which toolbars are visible, updates their offsets and
|
||||
/// computes ::Menu_height and ::Menu_Y
|
||||
void Compute_menu_offsets(void)
|
||||
{
|
||||
int i;
|
||||
int offset;
|
||||
|
||||
// Recompute all offsets
|
||||
offset=0;
|
||||
Menu_height=0;
|
||||
for (i = MENUBAR_COUNT-1; i >=0; i--)
|
||||
{
|
||||
Menu_bars[i].Top = offset;
|
||||
if(Menu_bars[i].Visible)
|
||||
{
|
||||
offset += Menu_bars[i].Height;
|
||||
Menu_height += Menu_bars[i].Height;
|
||||
}
|
||||
}
|
||||
// Update global menu coordinates
|
||||
Menu_Y = Screen_height - Menu_height * Menu_factor_Y;
|
||||
}
|
||||
Reference in New Issue
Block a user