Internal: Moved tooltips inside Buttons_pool, and Buttons_pool from globals.h to to windows.c/h for easier modification
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1908 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
d38f5ee981
commit
2343dcb54c
72
src/engine.c
72
src/engine.c
@ -66,68 +66,6 @@ Func_effect Effect_function_before_cancel;
|
|||||||
///This table holds pointers to the saved window backgrounds. We can have up to 8 windows open at a time.
|
///This table holds pointers to the saved window backgrounds. We can have up to 8 windows open at a time.
|
||||||
byte* Window_background[8];
|
byte* Window_background[8];
|
||||||
|
|
||||||
|
|
||||||
///Table of tooltip texts for menu buttons
|
|
||||||
char * Menu_tooltip[NB_BUTTONS]=
|
|
||||||
{
|
|
||||||
"Hide toolbars / Select ",
|
|
||||||
|
|
||||||
"Layers manager ",
|
|
||||||
"Get/Set transparent col.",
|
|
||||||
"Merge layer ",
|
|
||||||
"Add layer ",
|
|
||||||
"Drop layer ",
|
|
||||||
"Raise layer ",
|
|
||||||
"Lower layer ",
|
|
||||||
"Set frame time ",
|
|
||||||
"Go to first frame ",
|
|
||||||
"Go to previous frame ",
|
|
||||||
"Go to next frame ",
|
|
||||||
"Go to last frame ",
|
|
||||||
"Preview animation ",
|
|
||||||
"Layer select / toggle ",
|
|
||||||
"Paintbrush choice ",
|
|
||||||
"Adjust / Transform menu ",
|
|
||||||
"Freehand draw. / Toggle ",
|
|
||||||
"Splines / Toggle ",
|
|
||||||
"Lines / Toggle ",
|
|
||||||
"Spray / Menu ",
|
|
||||||
"Floodfill / Replace col.",
|
|
||||||
"Polylines / Polyforms ",
|
|
||||||
"Polyfill / Filled Pforms",
|
|
||||||
"Empty rectangles ",
|
|
||||||
"Filled rectangles ",
|
|
||||||
"Empty circles / ellipses",
|
|
||||||
"Filled circles / ellips.",
|
|
||||||
"Grad. rect / Grad. menu ",
|
|
||||||
"Grad. spheres / ellipses",
|
|
||||||
"Brush grab. / Restore ",
|
|
||||||
"Lasso / Restore brush ",
|
|
||||||
#ifdef __ENABLE_LUA__
|
|
||||||
"Brush effects / factory ",
|
|
||||||
#else
|
|
||||||
"Brush effects ",
|
|
||||||
#endif
|
|
||||||
"Drawing modes (effects) ",
|
|
||||||
"Text ",
|
|
||||||
"Magnify mode / Menu ",
|
|
||||||
"Pipette / Invert colors ",
|
|
||||||
"Screen size / Safe. res.",
|
|
||||||
"Go / Copy to other page ",
|
|
||||||
"Save as / Save ",
|
|
||||||
"Load / Re-load ",
|
|
||||||
"Settings / Skins ",
|
|
||||||
"Clear / with backcolor ",
|
|
||||||
"Help / Statistics ",
|
|
||||||
"Undo / Redo ",
|
|
||||||
"Kill current page ",
|
|
||||||
"Quit ",
|
|
||||||
"Palette editor / setup ",
|
|
||||||
"Scroll pal. bkwd / Fast ",
|
|
||||||
"Scroll pal. fwd / Fast ",
|
|
||||||
"Color #" ,
|
|
||||||
};
|
|
||||||
|
|
||||||
///Save a screen block (usually before erasing it with a new window or a dropdown menu)
|
///Save a screen block (usually before erasing it with a new window or a dropdown menu)
|
||||||
void Save_background(byte **buffer, int x_pos, int y_pos, int width, int height)
|
void Save_background(byte **buffer, int x_pos, int y_pos, int width, int height)
|
||||||
{
|
{
|
||||||
@ -631,7 +569,7 @@ void Status_print_palette_color(byte color)
|
|||||||
char str[25];
|
char str[25];
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
strcpy(str,Menu_tooltip[BUTTON_CHOOSE_COL]);
|
strcpy(str,Buttons_Pool[BUTTON_CHOOSE_COL].Tooltip);
|
||||||
sprintf(str+strlen(str),"%d (%d,%d,%d)",color,Main_palette[color].R,Main_palette[color].G,Main_palette[color].B);
|
sprintf(str+strlen(str),"%d (%d,%d,%d)",color,Main_palette[color].R,Main_palette[color].G,Main_palette[color].B);
|
||||||
// Pad spaces
|
// Pad spaces
|
||||||
for (i=strlen(str); i<24; i++)
|
for (i=strlen(str); i<24; i++)
|
||||||
@ -1496,7 +1434,7 @@ void Main_handler(void)
|
|||||||
Mouse_K = x; // Close_popup waits for end of click and resets Mouse_K...
|
Mouse_K = x; // Close_popup waits for end of click and resets Mouse_K...
|
||||||
}
|
}
|
||||||
|
|
||||||
Print_in_menu(Menu_tooltip[button_index],0);
|
Print_in_menu(Buttons_Pool[button_index].Tooltip,0);
|
||||||
|
|
||||||
/*if (Gfx->Hover_effect && !Buttons_Pool[button_index].Pressed)
|
/*if (Gfx->Hover_effect && !Buttons_Pool[button_index].Pressed)
|
||||||
Draw_menu_button(button_index, BUTTON_HIGHLIGHTED);
|
Draw_menu_button(button_index, BUTTON_HIGHLIGHTED);
|
||||||
@ -2570,7 +2508,7 @@ void Get_color_behind_window(byte * color, byte * click)
|
|||||||
Paintbrush_hidden=1;
|
Paintbrush_hidden=1;
|
||||||
c=-1; // color pointée: au début aucune, comme ça on initialise tout
|
c=-1; // color pointée: au début aucune, comme ça on initialise tout
|
||||||
if (Menu_is_visible_before_window)
|
if (Menu_is_visible_before_window)
|
||||||
Print_in_menu(Menu_tooltip[BUTTON_CHOOSE_COL],0);
|
Print_in_menu(Buttons_Pool[BUTTON_CHOOSE_COL].Tooltip,0);
|
||||||
|
|
||||||
Display_cursor();
|
Display_cursor();
|
||||||
|
|
||||||
@ -2600,9 +2538,9 @@ void Get_color_behind_window(byte * color, byte * click)
|
|||||||
for (index=strlen(str); index<a; index++)
|
for (index=strlen(str); index<a; index++)
|
||||||
str[index]=' ';
|
str[index]=' ';
|
||||||
str[a]=0;
|
str[a]=0;
|
||||||
Print_in_menu(str,strlen(Menu_tooltip[BUTTON_CHOOSE_COL]));
|
Print_in_menu(str,strlen(Buttons_Pool[BUTTON_CHOOSE_COL].Tooltip));
|
||||||
|
|
||||||
Print_general((26+((d+strlen(Menu_tooltip[BUTTON_CHOOSE_COL]))<<3))*Menu_factor_X,
|
Print_general((26+((d+strlen(Buttons_Pool[BUTTON_CHOOSE_COL].Tooltip))<<3))*Menu_factor_X,
|
||||||
Menu_status_Y," ",0,c);
|
Menu_status_Y," ",0,c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
29
src/global.h
29
src/global.h
@ -570,35 +570,6 @@ GFX2_GLOBAL T_Window Window_stack[8];
|
|||||||
|
|
||||||
#define Window_draggable Window_stack[Windows_open-1].Draggable
|
#define Window_draggable Window_stack[Windows_open-1].Draggable
|
||||||
|
|
||||||
|
|
||||||
/// Definition of the menu (toolbox)
|
|
||||||
GFX2_GLOBAL struct
|
|
||||||
{
|
|
||||||
// Button aspect
|
|
||||||
word X_offset; ///< Position relative to menu's left
|
|
||||||
word Y_offset; ///< Position relative to menu's top
|
|
||||||
word Width; ///< Button's active width
|
|
||||||
word Height; ///< Button's active heigth
|
|
||||||
byte Pressed; ///< Button is currently pressed
|
|
||||||
byte Shape; ///< Shape, listed in enum ::BUTTON_SHAPES
|
|
||||||
signed char Icon; ///< Which icon to display: Either the one from the toolbar (-1) or one of ::MENU_SPRITE
|
|
||||||
|
|
||||||
// Triggers on mouse/keyboard
|
|
||||||
Func_action Left_action; ///< Action triggered by a left mouseclick on the button
|
|
||||||
Func_action Right_action; ///< Action triggered by a right mouseclick on the button
|
|
||||||
word Left_shortcut[2]; ///< Keyboard shortcut for a left mouseclick
|
|
||||||
word Right_shortcut[2];///< Keyboard shortcut for a right mouseclick
|
|
||||||
byte Left_instant; ///< Will not wait for mouse release before triggering action
|
|
||||||
byte Right_instant; ///< Will not wait for mouse release before triggering action
|
|
||||||
|
|
||||||
// Data used when the button is unselected
|
|
||||||
Func_action Unselect_action; ///< Action triggered by unselecting the button
|
|
||||||
byte Family; ///< enum ::FAMILY_OF_BUTTONS.
|
|
||||||
|
|
||||||
} Buttons_Pool[NB_BUTTONS];
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// -- Information about the different drawing modes (effects)
|
// -- Information about the different drawing modes (effects)
|
||||||
|
|
||||||
/// Current effecting function. When no effect is selected this is ::No_effect()
|
/// Current effecting function. When no effect is selected this is ::No_effect()
|
||||||
|
|||||||
868
src/init.c
868
src/init.c
@ -782,16 +782,17 @@ void Do_nothing(void)
|
|||||||
|
|
||||||
// Initialiseur d'un bouton:
|
// Initialiseur d'un bouton:
|
||||||
|
|
||||||
void Init_button(byte btn_number,
|
void Init_button(byte btn_number,
|
||||||
word x_offset , word y_offset,
|
const char* tooltip,
|
||||||
word width , word height,
|
word x_offset, word y_offset,
|
||||||
byte shape,
|
word width, word height,
|
||||||
Func_action left_action,
|
byte shape,
|
||||||
Func_action right_action,
|
Func_action left_action,
|
||||||
byte left_instant,
|
Func_action right_action,
|
||||||
byte right_instant,
|
byte left_instant,
|
||||||
Func_action unselect_action,
|
byte right_instant,
|
||||||
byte family)
|
Func_action unselect_action,
|
||||||
|
byte family)
|
||||||
{
|
{
|
||||||
Buttons_Pool[btn_number].X_offset =x_offset;
|
Buttons_Pool[btn_number].X_offset =x_offset;
|
||||||
Buttons_Pool[btn_number].Y_offset =y_offset;
|
Buttons_Pool[btn_number].Y_offset =y_offset;
|
||||||
@ -800,6 +801,7 @@ void Init_button(byte btn_number,
|
|||||||
Buttons_Pool[btn_number].Pressed =0;
|
Buttons_Pool[btn_number].Pressed =0;
|
||||||
Buttons_Pool[btn_number].Icon =-1;
|
Buttons_Pool[btn_number].Icon =-1;
|
||||||
Buttons_Pool[btn_number].Shape =shape;
|
Buttons_Pool[btn_number].Shape =shape;
|
||||||
|
Buttons_Pool[btn_number].Tooltip =tooltip;
|
||||||
Buttons_Pool[btn_number].Left_action =left_action;
|
Buttons_Pool[btn_number].Left_action =left_action;
|
||||||
Buttons_Pool[btn_number].Right_action =right_action;
|
Buttons_Pool[btn_number].Right_action =right_action;
|
||||||
Buttons_Pool[btn_number].Left_instant =left_instant;
|
Buttons_Pool[btn_number].Left_instant =left_instant;
|
||||||
@ -822,503 +824,563 @@ void Init_buttons(void)
|
|||||||
Buttons_Pool[button_index].Right_shortcut[0]=0;
|
Buttons_Pool[button_index].Right_shortcut[0]=0;
|
||||||
Buttons_Pool[button_index].Right_shortcut[1]=0;
|
Buttons_Pool[button_index].Right_shortcut[1]=0;
|
||||||
Init_button(button_index,
|
Init_button(button_index,
|
||||||
0,0,
|
"",
|
||||||
1,1,
|
0,0,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
1,1,
|
||||||
Do_nothing,Do_nothing,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,0,
|
Do_nothing,Do_nothing,
|
||||||
Do_nothing,
|
0,0,
|
||||||
0);
|
Do_nothing,
|
||||||
|
0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ici viennent les déclarations des boutons que l'on sait gérer
|
// Ici viennent les déclarations des boutons que l'on sait gérer
|
||||||
|
|
||||||
Init_button(BUTTON_PAINTBRUSHES,
|
Init_button(BUTTON_PAINTBRUSHES,
|
||||||
0,1,
|
"Paintbrush choice ",
|
||||||
16,16,
|
0,1,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
16,16,
|
||||||
Button_Paintbrush_menu,Button_Brush_monochrome,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,0,
|
Button_Paintbrush_menu,Button_Brush_monochrome,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_INSTANT);
|
Do_nothing,
|
||||||
|
FAMILY_INSTANT);
|
||||||
|
|
||||||
Init_button(BUTTON_ADJUST,
|
Init_button(BUTTON_ADJUST,
|
||||||
0,18,
|
"Adjust / Transform menu ",
|
||||||
16,16,
|
0,18,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
16,16,
|
||||||
Button_Adjust,Button_Transform_menu,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,0,
|
Button_Adjust,Button_Transform_menu,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_TOOL);
|
Do_nothing,
|
||||||
|
FAMILY_TOOL);
|
||||||
|
|
||||||
Init_button(BUTTON_DRAW,
|
Init_button(BUTTON_DRAW,
|
||||||
17,1,
|
"Freehand draw. / Toggle ",
|
||||||
16,16,
|
17,1,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
16,16,
|
||||||
Button_Draw,Button_Draw_switch_mode,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,0,
|
Button_Draw,Button_Draw_switch_mode,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_TOOL);
|
Do_nothing,
|
||||||
|
FAMILY_TOOL);
|
||||||
|
|
||||||
Init_button(BUTTON_CURVES,
|
Init_button(BUTTON_CURVES,
|
||||||
17,18,
|
"Splines / Toggle ",
|
||||||
16,16,
|
17,18,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
16,16,
|
||||||
Button_Curves,Button_Curves_switch_mode,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,0,
|
Button_Curves,Button_Curves_switch_mode,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_TOOL);
|
Do_nothing,
|
||||||
|
FAMILY_TOOL);
|
||||||
|
|
||||||
Init_button(BUTTON_LINES,
|
Init_button(BUTTON_LINES,
|
||||||
34,1,
|
"Lines / Toggle ",
|
||||||
16,16,
|
34,1,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
16,16,
|
||||||
Button_Lines,Button_Lines_switch_mode,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,0,
|
Button_Lines,Button_Lines_switch_mode,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_TOOL);
|
Do_nothing,
|
||||||
|
FAMILY_TOOL);
|
||||||
|
|
||||||
Init_button(BUTTON_AIRBRUSH,
|
Init_button(BUTTON_AIRBRUSH,
|
||||||
34,18,
|
"Spray / Menu ",
|
||||||
16,16,
|
34,18,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
16,16,
|
||||||
Button_Airbrush,Button_Airbrush_menu,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,0,
|
Button_Airbrush,Button_Airbrush_menu,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_TOOL);
|
Do_nothing,
|
||||||
|
FAMILY_TOOL);
|
||||||
|
|
||||||
Init_button(BUTTON_FLOODFILL,
|
Init_button(BUTTON_FLOODFILL,
|
||||||
51,1,
|
"Floodfill / Replace col.",
|
||||||
16,16,
|
51,1,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
16,16,
|
||||||
Button_Fill,Button_Replace,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,0,
|
Button_Fill,Button_Replace,
|
||||||
Button_Unselect_fill,
|
0,0,
|
||||||
FAMILY_TOOL);
|
Button_Unselect_fill,
|
||||||
|
FAMILY_TOOL);
|
||||||
|
|
||||||
Init_button(BUTTON_POLYGONS,
|
Init_button(BUTTON_POLYGONS,
|
||||||
51,18,
|
"Polylines / Polyforms ",
|
||||||
15,15,
|
51,18,
|
||||||
BUTTON_SHAPE_TRIANGLE_TOP_LEFT,
|
15,15,
|
||||||
Button_polygon,Button_Polyform,
|
BUTTON_SHAPE_TRIANGLE_TOP_LEFT,
|
||||||
0,0,
|
Button_polygon,Button_Polyform,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_TOOL);
|
Do_nothing,
|
||||||
|
FAMILY_TOOL);
|
||||||
|
|
||||||
Init_button(BUTTON_POLYFILL,
|
Init_button(BUTTON_POLYFILL,
|
||||||
52,19,
|
"Polyfill / Filled Pforms",
|
||||||
15,15,
|
52,19,
|
||||||
BUTTON_SHAPE_TRIANGLE_BOTTOM_RIGHT,
|
15,15,
|
||||||
Button_Polyfill,Button_Filled_polyform,
|
BUTTON_SHAPE_TRIANGLE_BOTTOM_RIGHT,
|
||||||
0,0,
|
Button_Polyfill,Button_Filled_polyform,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_TOOL);
|
Do_nothing,
|
||||||
|
FAMILY_TOOL);
|
||||||
|
|
||||||
Init_button(BUTTON_RECTANGLES,
|
Init_button(BUTTON_RECTANGLES,
|
||||||
68,1,
|
"Empty rectangles ",
|
||||||
15,15,
|
68,1,
|
||||||
BUTTON_SHAPE_TRIANGLE_TOP_LEFT,
|
15,15,
|
||||||
Button_Empty_rectangle,Button_Empty_rectangle,
|
BUTTON_SHAPE_TRIANGLE_TOP_LEFT,
|
||||||
0,0,
|
Button_Empty_rectangle,Button_Empty_rectangle,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_TOOL);
|
Do_nothing,
|
||||||
|
FAMILY_TOOL);
|
||||||
|
|
||||||
Init_button(BUTTON_FILLRECT,
|
Init_button(BUTTON_FILLRECT,
|
||||||
69,2,
|
"Filled rectangles ",
|
||||||
15,15,
|
69,2,
|
||||||
BUTTON_SHAPE_TRIANGLE_BOTTOM_RIGHT,
|
15,15,
|
||||||
Button_Filled_rectangle,Button_Filled_rectangle,
|
BUTTON_SHAPE_TRIANGLE_BOTTOM_RIGHT,
|
||||||
0,0,
|
Button_Filled_rectangle,Button_Filled_rectangle,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_TOOL);
|
Do_nothing,
|
||||||
|
FAMILY_TOOL);
|
||||||
|
|
||||||
Init_button(BUTTON_CIRCLES,
|
Init_button(BUTTON_CIRCLES,
|
||||||
68,18,
|
"Empty circles / ellipses",
|
||||||
15,15,
|
68,18,
|
||||||
BUTTON_SHAPE_TRIANGLE_TOP_LEFT,
|
15,15,
|
||||||
Button_Empty_circle,Button_Empty_ellipse,
|
BUTTON_SHAPE_TRIANGLE_TOP_LEFT,
|
||||||
0,0,
|
Button_Empty_circle,Button_Empty_ellipse,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_TOOL);
|
Do_nothing,
|
||||||
|
FAMILY_TOOL);
|
||||||
|
|
||||||
Init_button(BUTTON_FILLCIRC,
|
Init_button(BUTTON_FILLCIRC,
|
||||||
69,19,
|
"Filled circles / ellips.",
|
||||||
15,15,
|
69,19,
|
||||||
BUTTON_SHAPE_TRIANGLE_BOTTOM_RIGHT,
|
15,15,
|
||||||
Button_Filled_circle,Button_Filled_ellipse,
|
BUTTON_SHAPE_TRIANGLE_BOTTOM_RIGHT,
|
||||||
0,0,
|
Button_Filled_circle,Button_Filled_ellipse,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_TOOL);
|
Do_nothing,
|
||||||
|
FAMILY_TOOL);
|
||||||
|
|
||||||
Init_button(BUTTON_GRADRECT,
|
Init_button(BUTTON_GRADRECT,
|
||||||
85,1,
|
"Grad. rect / Grad. menu ",
|
||||||
16,16,
|
85,1,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
16,16,
|
||||||
Button_Grad_rectangle,Button_Gradients,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,0,
|
Button_Grad_rectangle,Button_Gradients,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_TOOL);
|
Do_nothing,
|
||||||
|
FAMILY_TOOL);
|
||||||
|
|
||||||
Init_button(BUTTON_SPHERES,
|
Init_button(BUTTON_SPHERES,
|
||||||
85,18,
|
"Grad. spheres / ellipses",
|
||||||
16,16,
|
85,18,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
16,16,
|
||||||
Button_Grad_circle,Button_Grad_ellipse,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,0,
|
Button_Grad_circle,Button_Grad_ellipse,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_TOOL);
|
Do_nothing,
|
||||||
|
FAMILY_TOOL);
|
||||||
|
|
||||||
Init_button(BUTTON_BRUSH,
|
Init_button(BUTTON_BRUSH,
|
||||||
106,1,
|
"Brush grab. / Restore ",
|
||||||
15,15,
|
106,1,
|
||||||
BUTTON_SHAPE_TRIANGLE_TOP_LEFT,
|
15,15,
|
||||||
Button_Brush,Button_Restore_brush,
|
BUTTON_SHAPE_TRIANGLE_TOP_LEFT,
|
||||||
0,0,
|
Button_Brush,Button_Restore_brush,
|
||||||
Button_Unselect_brush,
|
0,0,
|
||||||
FAMILY_INTERRUPTION);
|
Button_Unselect_brush,
|
||||||
|
FAMILY_INTERRUPTION);
|
||||||
|
|
||||||
Init_button(BUTTON_POLYBRUSH,
|
Init_button(BUTTON_POLYBRUSH,
|
||||||
107,2,
|
"Lasso / Restore brush ",
|
||||||
15,15,
|
107,2,
|
||||||
BUTTON_SHAPE_TRIANGLE_BOTTOM_RIGHT,
|
15,15,
|
||||||
Button_Lasso,Button_Restore_brush,
|
BUTTON_SHAPE_TRIANGLE_BOTTOM_RIGHT,
|
||||||
0,0,
|
Button_Lasso,Button_Restore_brush,
|
||||||
Button_Unselect_lasso,
|
0,0,
|
||||||
FAMILY_INTERRUPTION);
|
Button_Unselect_lasso,
|
||||||
|
FAMILY_INTERRUPTION);
|
||||||
|
|
||||||
Init_button(BUTTON_BRUSH_EFFECTS,
|
Init_button(BUTTON_BRUSH_EFFECTS,
|
||||||
106, 18,
|
|
||||||
16, 16,
|
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
|
||||||
#ifdef __ENABLE_LUA__
|
#ifdef __ENABLE_LUA__
|
||||||
Button_Brush_FX, Button_Brush_Factory,
|
"Brush effects / factory ",
|
||||||
#else
|
#else
|
||||||
Button_Brush_FX, Button_Brush_FX,
|
"Brush effects ",
|
||||||
#endif
|
#endif
|
||||||
0,0,
|
106, 18,
|
||||||
Do_nothing,
|
16, 16,
|
||||||
FAMILY_INSTANT);
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
|
#ifdef __ENABLE_LUA__
|
||||||
|
Button_Brush_FX, Button_Brush_Factory,
|
||||||
|
#else
|
||||||
|
Button_Brush_FX, Button_Brush_FX,
|
||||||
|
#endif
|
||||||
|
0,0,
|
||||||
|
Do_nothing,
|
||||||
|
FAMILY_INSTANT);
|
||||||
|
|
||||||
Init_button(BUTTON_EFFECTS,
|
Init_button(BUTTON_EFFECTS,
|
||||||
123,1,
|
"Drawing modes (effects) ",
|
||||||
16,16,
|
123,1,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
16,16,
|
||||||
Button_Effects,Button_Effects,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,0,
|
Button_Effects,Button_Effects,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_EFFECTS);
|
Do_nothing,
|
||||||
|
FAMILY_EFFECTS);
|
||||||
|
|
||||||
Init_button(BUTTON_TEXT,
|
Init_button(BUTTON_TEXT,
|
||||||
123,18,
|
"Text ",
|
||||||
16,16,
|
123,18,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
16,16,
|
||||||
Button_Text,Button_Text,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,0,
|
Button_Text,Button_Text,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_INSTANT);
|
Do_nothing,
|
||||||
|
FAMILY_INSTANT);
|
||||||
|
|
||||||
Init_button(BUTTON_MAGNIFIER,
|
Init_button(BUTTON_MAGNIFIER,
|
||||||
140,1,
|
"Magnify mode / Menu ",
|
||||||
16,16,
|
140,1,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
16,16,
|
||||||
Button_Magnify,Button_Magnify_menu,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,1,
|
Button_Magnify,Button_Magnify_menu,
|
||||||
Button_Unselect_magnifier,
|
0,1,
|
||||||
FAMILY_INTERRUPTION);
|
Button_Unselect_magnifier,
|
||||||
|
FAMILY_INTERRUPTION);
|
||||||
|
|
||||||
Init_button(BUTTON_COLORPICKER,
|
Init_button(BUTTON_COLORPICKER,
|
||||||
140,18,
|
"Pipette / Invert colors ",
|
||||||
16,16,
|
140,18,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
16,16,
|
||||||
Button_Colorpicker,Button_Invert_foreback,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,0,
|
Button_Colorpicker,Button_Invert_foreback,
|
||||||
Button_Unselect_colorpicker,
|
0,0,
|
||||||
FAMILY_INTERRUPTION);
|
Button_Unselect_colorpicker,
|
||||||
|
FAMILY_INTERRUPTION);
|
||||||
|
|
||||||
Init_button(BUTTON_RESOL,
|
Init_button(BUTTON_RESOL,
|
||||||
161,1,
|
"Screen size / Safe. res.",
|
||||||
16,16,
|
161,1,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
16,16,
|
||||||
Button_Resolution,Button_Safety_resolution,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,0,
|
Button_Resolution,Button_Safety_resolution,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_INSTANT);
|
Do_nothing,
|
||||||
|
FAMILY_INSTANT);
|
||||||
|
|
||||||
Init_button(BUTTON_PAGE,
|
Init_button(BUTTON_PAGE,
|
||||||
161,18,
|
"Go / Copy to other page ",
|
||||||
16,16,
|
161,18,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
16,16,
|
||||||
Button_Page,Button_Copy_page,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,0,
|
Button_Page,Button_Copy_page,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_INSTANT);
|
Do_nothing,
|
||||||
|
FAMILY_INSTANT);
|
||||||
|
|
||||||
Init_button(BUTTON_SAVE,
|
Init_button(BUTTON_SAVE,
|
||||||
178,1,
|
"Save as / Save ",
|
||||||
15,15,
|
178,1,
|
||||||
BUTTON_SHAPE_TRIANGLE_TOP_LEFT,
|
15,15,
|
||||||
Button_Save,Button_Autosave,
|
BUTTON_SHAPE_TRIANGLE_TOP_LEFT,
|
||||||
0,0,
|
Button_Save,Button_Autosave,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_INSTANT);
|
Do_nothing,
|
||||||
|
FAMILY_INSTANT);
|
||||||
|
|
||||||
Init_button(BUTTON_LOAD,
|
Init_button(BUTTON_LOAD,
|
||||||
179,2,
|
"Load / Re-load ",
|
||||||
15,15,
|
179,2,
|
||||||
BUTTON_SHAPE_TRIANGLE_BOTTOM_RIGHT,
|
15,15,
|
||||||
Button_Load,Button_Reload,
|
BUTTON_SHAPE_TRIANGLE_BOTTOM_RIGHT,
|
||||||
0,0,
|
Button_Load,Button_Reload,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_INSTANT);
|
Do_nothing,
|
||||||
|
FAMILY_INSTANT);
|
||||||
|
|
||||||
Init_button(BUTTON_SETTINGS,
|
Init_button(BUTTON_SETTINGS,
|
||||||
178,18,
|
"Settings / Skins ",
|
||||||
16,16,
|
178,18,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
16,16,
|
||||||
Button_Settings,Button_Skins,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,0,
|
Button_Settings,Button_Skins,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_INSTANT);
|
Do_nothing,
|
||||||
|
FAMILY_INSTANT);
|
||||||
|
|
||||||
Init_button(BUTTON_CLEAR,
|
Init_button(BUTTON_CLEAR,
|
||||||
195,1,
|
"Clear / with backcolor ",
|
||||||
17,16,
|
195,1,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
17,16,
|
||||||
Button_Clear,Button_Clear_with_backcolor,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,0,
|
Button_Clear,Button_Clear_with_backcolor,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_INSTANT);
|
Do_nothing,
|
||||||
|
FAMILY_INSTANT);
|
||||||
|
|
||||||
Init_button(BUTTON_HELP,
|
Init_button(BUTTON_HELP,
|
||||||
195,18,
|
"Help / Statistics ",
|
||||||
17,16,
|
195,18,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
17,16,
|
||||||
Button_Help,Button_Stats,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,0,
|
Button_Help,Button_Stats,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_INSTANT);
|
Do_nothing,
|
||||||
|
FAMILY_INSTANT);
|
||||||
|
|
||||||
Init_button(BUTTON_UNDO,
|
Init_button(BUTTON_UNDO,
|
||||||
213,1,
|
"Undo / Redo ",
|
||||||
19,12,
|
213,1,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
19,12,
|
||||||
Button_Undo,Button_Redo,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,0,
|
Button_Undo,Button_Redo,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_INSTANT);
|
Do_nothing,
|
||||||
|
FAMILY_INSTANT);
|
||||||
|
|
||||||
Init_button(BUTTON_KILL,
|
Init_button(BUTTON_KILL,
|
||||||
213,14,
|
"Kill current page ",
|
||||||
19,7,
|
213,14,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
19,7,
|
||||||
Button_Kill,Button_Kill,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,0,
|
Button_Kill,Button_Kill,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_INSTANT);
|
Do_nothing,
|
||||||
|
FAMILY_INSTANT);
|
||||||
|
|
||||||
Init_button(BUTTON_QUIT,
|
Init_button(BUTTON_QUIT,
|
||||||
213,22,
|
"Quit ",
|
||||||
19,12,
|
213,22,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
19,12,
|
||||||
Button_Quit,Button_Quit,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,0,
|
Button_Quit,Button_Quit,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_INSTANT);
|
Do_nothing,
|
||||||
|
FAMILY_INSTANT);
|
||||||
|
|
||||||
Init_button(BUTTON_PALETTE,
|
Init_button(BUTTON_PALETTE,
|
||||||
237,9,
|
"Palette editor / setup ",
|
||||||
16,8,
|
237,9,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
16,8,
|
||||||
Button_Palette,Button_Secondary_palette,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,0,
|
Button_Palette,Button_Secondary_palette,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_INSTANT);
|
Do_nothing,
|
||||||
|
FAMILY_INSTANT);
|
||||||
|
|
||||||
Init_button(BUTTON_PAL_LEFT,
|
Init_button(BUTTON_PAL_LEFT,
|
||||||
237,18,
|
"Scroll pal. bkwd / Fast ",
|
||||||
15,15,
|
237,18,
|
||||||
BUTTON_SHAPE_TRIANGLE_TOP_LEFT,
|
15,15,
|
||||||
Button_Pal_left,Button_Pal_left_fast,
|
BUTTON_SHAPE_TRIANGLE_TOP_LEFT,
|
||||||
0,0,
|
Button_Pal_left,Button_Pal_left_fast,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_INSTANT);
|
Do_nothing,
|
||||||
|
FAMILY_INSTANT);
|
||||||
|
|
||||||
Init_button(BUTTON_PAL_RIGHT,
|
Init_button(BUTTON_PAL_RIGHT,
|
||||||
238,19,
|
"Scroll pal. fwd / Fast ",
|
||||||
15,15,
|
238,19,
|
||||||
BUTTON_SHAPE_TRIANGLE_BOTTOM_RIGHT,
|
15,15,
|
||||||
Button_Pal_right,Button_Pal_right_fast,
|
BUTTON_SHAPE_TRIANGLE_BOTTOM_RIGHT,
|
||||||
0,0,
|
Button_Pal_right,Button_Pal_right_fast,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_INSTANT);
|
Do_nothing,
|
||||||
|
FAMILY_INSTANT);
|
||||||
|
|
||||||
Init_button(BUTTON_CHOOSE_COL,
|
Init_button(BUTTON_CHOOSE_COL,
|
||||||
MENU_WIDTH+1,1,
|
"Color #" ,
|
||||||
1,32, // La largeur est mise à jour à chq chngmnt de mode
|
MENU_WIDTH+1,1,
|
||||||
BUTTON_SHAPE_NO_FRAME,
|
1,32, // La largeur est mise à jour à chq chngmnt de mode
|
||||||
Button_Select_forecolor,Button_Select_backcolor,
|
BUTTON_SHAPE_NO_FRAME,
|
||||||
1,1,
|
Button_Select_forecolor,Button_Select_backcolor,
|
||||||
Do_nothing,
|
1,1,
|
||||||
FAMILY_INSTANT);
|
Do_nothing,
|
||||||
|
FAMILY_INSTANT);
|
||||||
|
|
||||||
// Layer bar
|
// Layer bar
|
||||||
#ifndef NOLAYERS
|
#ifndef NOLAYERS
|
||||||
Init_button(BUTTON_LAYER_MENU,
|
Init_button(BUTTON_LAYER_MENU,
|
||||||
0,0,
|
"Layers manager ",
|
||||||
57,9,
|
0,0,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
57,9,
|
||||||
Button_Layer_menu, Button_Layer_menu,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,0,
|
Button_Layer_menu, Button_Layer_menu,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_INSTANT);
|
Do_nothing,
|
||||||
|
FAMILY_INSTANT);
|
||||||
Init_button(BUTTON_LAYER_COLOR,
|
Init_button(BUTTON_LAYER_COLOR,
|
||||||
58,0,
|
"Get/Set transparent col.",
|
||||||
13,9,
|
58,0,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
13,9,
|
||||||
Button_Layer_get_transparent, Button_Layer_set_transparent,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,0,
|
Button_Layer_get_transparent, Button_Layer_set_transparent,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_INSTANT);
|
Do_nothing,
|
||||||
|
FAMILY_INSTANT);
|
||||||
Init_button(BUTTON_LAYER_MERGE,
|
Init_button(BUTTON_LAYER_MERGE,
|
||||||
72,0,
|
"Merge layer ",
|
||||||
13,9,
|
72,0,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
13,9,
|
||||||
Button_Layer_merge, Button_Layer_merge,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,0,
|
Button_Layer_merge, Button_Layer_merge,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_INSTANT);
|
Do_nothing,
|
||||||
|
FAMILY_INSTANT);
|
||||||
Init_button(BUTTON_LAYER_ADD,
|
Init_button(BUTTON_LAYER_ADD,
|
||||||
86,0,
|
"Add layer ",
|
||||||
13,9,
|
86,0,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
13,9,
|
||||||
Button_Layer_add, Button_Layer_add,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,0,
|
Button_Layer_add, Button_Layer_add,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_INSTANT);
|
Do_nothing,
|
||||||
|
FAMILY_INSTANT);
|
||||||
Init_button(BUTTON_LAYER_REMOVE,
|
Init_button(BUTTON_LAYER_REMOVE,
|
||||||
100,0,
|
"Drop layer ",
|
||||||
13,9,
|
100,0,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
13,9,
|
||||||
Button_Layer_remove, Button_Layer_remove,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,0,
|
Button_Layer_remove, Button_Layer_remove,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_INSTANT);
|
Do_nothing,
|
||||||
|
FAMILY_INSTANT);
|
||||||
Init_button(BUTTON_LAYER_DOWN,
|
Init_button(BUTTON_LAYER_DOWN,
|
||||||
114,0,
|
"Lower layer ",
|
||||||
13,9,
|
114,0,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
13,9,
|
||||||
Button_Layer_down, Button_Layer_down,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,0,
|
Button_Layer_down, Button_Layer_down,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_INSTANT);
|
Do_nothing,
|
||||||
|
FAMILY_INSTANT);
|
||||||
Init_button(BUTTON_LAYER_UP,
|
Init_button(BUTTON_LAYER_UP,
|
||||||
128,0,
|
"Raise layer ",
|
||||||
13,9,
|
128,0,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
13,9,
|
||||||
Button_Layer_up, Button_Layer_up,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,0,
|
Button_Layer_up, Button_Layer_up,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_INSTANT);
|
Do_nothing,
|
||||||
|
FAMILY_INSTANT);
|
||||||
Init_button(BUTTON_LAYER_SELECT,
|
Init_button(BUTTON_LAYER_SELECT,
|
||||||
142,0,
|
"Layer select / toggle ",
|
||||||
13,9, // Will be updated according to actual number of layers
|
142,0,
|
||||||
BUTTON_SHAPE_NO_FRAME,
|
13,9, // Will be updated according to actual number of layers
|
||||||
Button_Layer_select, Button_Layer_toggle,
|
BUTTON_SHAPE_NO_FRAME,
|
||||||
0,0,
|
Button_Layer_select, Button_Layer_toggle,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_INSTANT);
|
Do_nothing,
|
||||||
|
FAMILY_INSTANT);
|
||||||
#else
|
#else
|
||||||
// Anim bar
|
// Anim bar
|
||||||
Init_button(BUTTON_LAYER_MENU,
|
Init_button(BUTTON_LAYER_MENU,
|
||||||
0,0,
|
"Layers manager ",
|
||||||
44,13,
|
0,0,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
44,13,
|
||||||
Button_Layer_menu, Button_Layer_menu,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,0,
|
Button_Layer_menu, Button_Layer_menu,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_INSTANT);
|
Do_nothing,
|
||||||
|
FAMILY_INSTANT);
|
||||||
Init_button(BUTTON_ANIM_TIME,
|
Init_button(BUTTON_ANIM_TIME,
|
||||||
45,0,
|
"Set frame time ",
|
||||||
13,13,
|
45,0,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
13,13,
|
||||||
Button_Anim_time, Button_Anim_time,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,0,
|
Button_Anim_time, Button_Anim_time,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_INSTANT);
|
Do_nothing,
|
||||||
|
FAMILY_INSTANT);
|
||||||
Init_button(BUTTON_ANIM_FIRST_FRAME,
|
Init_button(BUTTON_ANIM_FIRST_FRAME,
|
||||||
116,0,
|
"Go to first frame ",
|
||||||
13,13,
|
116,0,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
13,13,
|
||||||
Button_Anim_first_frame, Button_Anim_first_frame,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,0,
|
Button_Anim_first_frame, Button_Anim_first_frame,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_INSTANT);
|
Do_nothing,
|
||||||
|
FAMILY_INSTANT);
|
||||||
Init_button(BUTTON_ANIM_PREV_FRAME,
|
Init_button(BUTTON_ANIM_PREV_FRAME,
|
||||||
130,0,
|
"Go to previous frame ",
|
||||||
13,13,
|
130,0,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
13,13,
|
||||||
Button_Anim_prev_frame, Button_Anim_continuous_prev,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,1,
|
Button_Anim_prev_frame, Button_Anim_continuous_prev,
|
||||||
Do_nothing,
|
0,1,
|
||||||
FAMILY_INSTANT);
|
Do_nothing,
|
||||||
|
FAMILY_INSTANT);
|
||||||
Init_button(BUTTON_ANIM_NEXT_FRAME,
|
Init_button(BUTTON_ANIM_NEXT_FRAME,
|
||||||
144,0,
|
"Go to next frame ",
|
||||||
13,13,
|
144,0,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
13,13,
|
||||||
Button_Anim_next_frame, Button_Anim_continuous_next,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,1,
|
Button_Anim_next_frame, Button_Anim_continuous_next,
|
||||||
Do_nothing,
|
0,1,
|
||||||
FAMILY_INSTANT);
|
Do_nothing,
|
||||||
|
FAMILY_INSTANT);
|
||||||
Init_button(BUTTON_ANIM_LAST_FRAME,
|
Init_button(BUTTON_ANIM_LAST_FRAME,
|
||||||
158,0,
|
"Go to last frame ",
|
||||||
13,13,
|
158,0,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
13,13,
|
||||||
Button_Anim_last_frame, Button_Anim_last_frame,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,0,
|
Button_Anim_last_frame, Button_Anim_last_frame,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_INSTANT);
|
Do_nothing,
|
||||||
|
FAMILY_INSTANT);
|
||||||
Init_button(BUTTON_LAYER_ADD,
|
Init_button(BUTTON_LAYER_ADD,
|
||||||
177,0,
|
"Add layer ",
|
||||||
13,13,
|
177,0,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
13,13,
|
||||||
Button_Layer_add, Button_Layer_add,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,0,
|
Button_Layer_add, Button_Layer_add,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_INSTANT);
|
Do_nothing,
|
||||||
|
FAMILY_INSTANT);
|
||||||
Init_button(BUTTON_LAYER_REMOVE,
|
Init_button(BUTTON_LAYER_REMOVE,
|
||||||
191,0,
|
"Drop layer ",
|
||||||
13,13,
|
191,0,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
13,13,
|
||||||
Button_Layer_remove, Button_Layer_remove,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,0,
|
Button_Layer_remove, Button_Layer_remove,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_INSTANT);
|
Do_nothing,
|
||||||
|
FAMILY_INSTANT);
|
||||||
Init_button(BUTTON_LAYER_DOWN,
|
Init_button(BUTTON_LAYER_DOWN,
|
||||||
205,0,
|
"Lower layer ",
|
||||||
13,13,
|
205,0,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
13,13,
|
||||||
Button_Layer_down, Button_Layer_down,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,0,
|
Button_Layer_down, Button_Layer_down,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_INSTANT);
|
Do_nothing,
|
||||||
|
FAMILY_INSTANT);
|
||||||
Init_button(BUTTON_LAYER_UP,
|
Init_button(BUTTON_LAYER_UP,
|
||||||
219,0,
|
"Raise layer ",
|
||||||
13,13,
|
219,0,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
13,13,
|
||||||
Button_Layer_up, Button_Layer_up,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,0,
|
Button_Layer_up, Button_Layer_up,
|
||||||
Do_nothing,
|
0,0,
|
||||||
FAMILY_INSTANT);
|
Do_nothing,
|
||||||
|
FAMILY_INSTANT);
|
||||||
#endif
|
#endif
|
||||||
// Status bar
|
// Status bar
|
||||||
Init_button(BUTTON_HIDE,
|
Init_button(BUTTON_HIDE,
|
||||||
0,0,
|
"Hide toolbars / Select ",
|
||||||
16,9,
|
0,0,
|
||||||
BUTTON_SHAPE_RECTANGLE,
|
16,9,
|
||||||
Button_Toggle_all_toolbars, Button_Toggle_toolbar,
|
BUTTON_SHAPE_RECTANGLE,
|
||||||
0,1,
|
Button_Toggle_all_toolbars, Button_Toggle_toolbar,
|
||||||
Do_nothing,
|
0,1,
|
||||||
FAMILY_TOOLBAR);
|
Do_nothing,
|
||||||
|
FAMILY_TOOLBAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -41,6 +41,7 @@
|
|||||||
#include "sdlscreen.h"
|
#include "sdlscreen.h"
|
||||||
#include "palette.h"
|
#include "palette.h"
|
||||||
|
|
||||||
|
T_Toolbar_button Buttons_Pool[NB_BUTTONS];
|
||||||
|
|
||||||
/// Width of one layer button, in pixels before scaling
|
/// Width of one layer button, in pixels before scaling
|
||||||
word Layer_button_width = 1;
|
word Layer_button_width = 1;
|
||||||
|
|||||||
@ -114,4 +114,33 @@ extern word Layer_button_width;
|
|||||||
/// Copy viewport settings and offsets from the Main to the Spare.
|
/// Copy viewport settings and offsets from the Main to the Spare.
|
||||||
void Copy_view_to_spare(void);
|
void Copy_view_to_spare(void);
|
||||||
|
|
||||||
|
/// Definition of a toolbar button
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
// Button aspect
|
||||||
|
word X_offset; ///< Position relative to menu's left
|
||||||
|
word Y_offset; ///< Position relative to menu's top
|
||||||
|
word Width; ///< Button's active width
|
||||||
|
word Height; ///< Button's active heigth
|
||||||
|
byte Pressed; ///< Button is currently pressed
|
||||||
|
byte Shape; ///< Shape, listed in enum ::BUTTON_SHAPES
|
||||||
|
signed char Icon; ///< Which icon to display: Either the one from the toolbar (-1) or one of ::MENU_SPRITE
|
||||||
|
|
||||||
|
// Triggers on mouse/keyboard
|
||||||
|
Func_action Left_action; ///< Action triggered by a left mouseclick on the button
|
||||||
|
Func_action Right_action; ///< Action triggered by a right mouseclick on the button
|
||||||
|
word Left_shortcut[2]; ///< Keyboard shortcut for a left mouseclick
|
||||||
|
word Right_shortcut[2];///< Keyboard shortcut for a right mouseclick
|
||||||
|
byte Left_instant; ///< Will not wait for mouse release before triggering action
|
||||||
|
byte Right_instant; ///< Will not wait for mouse release before triggering action
|
||||||
|
const char * Tooltip; ///< Text in status bar when button is hovered
|
||||||
|
|
||||||
|
// Data used when the button is unselected
|
||||||
|
Func_action Unselect_action; ///< Action triggered by unselecting the button
|
||||||
|
byte Family; ///< enum ::FAMILY_OF_BUTTONS.
|
||||||
|
|
||||||
|
} T_Toolbar_button;
|
||||||
|
|
||||||
|
extern T_Toolbar_button Buttons_Pool[NB_BUTTONS];
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user