Add a quick-preview when hovering the layer buttons.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1884 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Adrien Destugues
2011-12-31 17:16:44 +00:00
parent 9acd46841d
commit 1b805666e7
3 changed files with 47 additions and 2 deletions

View File

@@ -147,7 +147,7 @@ void Button_Layer_remove(void)
Display_cursor();
}
void Button_Layer_select(void)
short Layer_under_mouse(void)
{
short layer;
// Determine which button is clicked according to mouse position
@@ -160,6 +160,12 @@ void Button_Layer_select(void)
else if (layer > Main_backups->Pages->Nb_layers-1)
layer=Main_backups->Pages->Nb_layers-1;
return layer;
}
void Button_Layer_select(void)
{
short layer = Layer_under_mouse;
Layer_activate(layer, LEFT_SIDE);
}