Toolbars now automatically switch to anim/layers when required

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1911 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud
2012-03-04 15:35:20 +00:00
parent e73eb2786a
commit de6b3ac8d1
6 changed files with 161 additions and 97 deletions

View File

@@ -84,7 +84,6 @@
#include "windows.h"
#include "layers.h"
#include "special.h"
#include "buttons.h"
char Gui_loading_error_message[512];
@@ -2875,30 +2874,6 @@ void Set_current_skin(const char *skinfile, T_Gui_skin *gfx)
}
}
///
/// 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;
}
void Init_paintbrush(int index, int width, int height, byte shape, const char * bitmap)
{
if (bitmap!=NULL)