trunk: Reserved hotkeys for layers. Allowed a single shortcut to launch several actions (Issue 88)

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1062 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud 2009-10-06 22:42:43 +00:00
parent bdf0186c7f
commit 5fd28bdd3b
6 changed files with 722 additions and 514 deletions

View File

@ -70,7 +70,7 @@
#define isHidden(x) ((x)->d_name[0]=='.')
#endif
extern char Program_version[]; // generated in pversion.c
//extern char Program_version[]; // generated in pversion.c
extern short Old_MX;
extern short Old_MY;

18
const.h
View File

@ -33,7 +33,7 @@
#define BETA1 98 ///< Version number for gfx2.cfg (3/4)
#define BETA2 0 ///< Version number for gfx2.cfg (4/4)
#define MAX_VIDEO_MODES 100 ///< Maximum number of video modes Grafx2 can propose.
#define NB_SHORTCUTS 159 ///< Number of actions that can have a key combination associated to it.
#define NB_SHORTCUTS 175 ///< Number of actions that can have a key combination associated to it.
#define NB_ZOOM_FACTORS 12 ///< Number of zoom levels available in the magnifier.
#define MENU_WIDTH 254 ///< Width of the menu (not counting the palette)
#define MENU_HEIGHT 44 ///< Height of the menu.
@ -408,6 +408,22 @@ enum SPECIAL_ACTIONS
SPECIAL_ZOOM_18,
SPECIAL_ZOOM_20,
SPECIAL_SHOW_GRID,
SPECIAL_LAYER1_SELECT,
SPECIAL_LAYER1_TOGGLE,
SPECIAL_LAYER2_SELECT,
SPECIAL_LAYER2_TOGGLE,
SPECIAL_LAYER3_SELECT,
SPECIAL_LAYER3_TOGGLE,
SPECIAL_LAYER4_SELECT,
SPECIAL_LAYER4_TOGGLE,
SPECIAL_LAYER5_SELECT,
SPECIAL_LAYER5_TOGGLE,
SPECIAL_LAYER6_SELECT,
SPECIAL_LAYER6_TOGGLE,
SPECIAL_LAYER7_SELECT,
SPECIAL_LAYER7_TOGGLE,
SPECIAL_LAYER8_SELECT,
SPECIAL_LAYER8_TOGGLE,
NB_SPECIAL_SHORTCUTS ///< Number of special shortcuts
};

1054
engine.c

File diff suppressed because it is too large Load Diff

BIN
gfx2.cfg

Binary file not shown.

View File

@ -283,6 +283,23 @@ static const T_Help_table helptable_help[] =
HELP_LINK (" Next : %s", SPECIAL_NEXT_USER_BACKCOLOR)
HELP_LINK (" Previous: %s", SPECIAL_PREVIOUS_USER_BACKCOLOR)
HELP_TEXT ("")
HELP_TEXT ("LAYERS")
HELP_LINK (" Select 1 : %s", SPECIAL_LAYER1_SELECT)
HELP_LINK (" Toggle 1 : %s", SPECIAL_LAYER1_TOGGLE)
HELP_LINK (" Select 2 : %s", SPECIAL_LAYER2_SELECT)
HELP_LINK (" Toggle 2 : %s", SPECIAL_LAYER2_TOGGLE)
HELP_LINK (" Select 3 : %s", SPECIAL_LAYER3_SELECT)
HELP_LINK (" Toggle 3 : %s", SPECIAL_LAYER3_TOGGLE)
HELP_LINK (" Select 4 : %s", SPECIAL_LAYER4_SELECT)
HELP_LINK (" Toggle 4 : %s", SPECIAL_LAYER4_TOGGLE)
HELP_LINK (" Select 5 : %s", SPECIAL_LAYER5_SELECT)
HELP_LINK (" Toggle 5 : %s", SPECIAL_LAYER5_TOGGLE)
HELP_LINK (" Select 6 : %s", SPECIAL_LAYER6_SELECT)
HELP_LINK (" Toggle 6 : %s", SPECIAL_LAYER6_TOGGLE)
HELP_LINK (" Select 7 : %s", SPECIAL_LAYER7_SELECT)
HELP_LINK (" Toggle 7 : %s", SPECIAL_LAYER7_TOGGLE)
HELP_LINK (" Select 8 : %s", SPECIAL_LAYER8_SELECT)
HELP_LINK (" Toggle 8 : %s", SPECIAL_LAYER8_TOGGLE)
};
static const T_Help_table helptable_credits[] =
{

145
hotkeys.c
View File

@ -1299,6 +1299,135 @@ T_Key_config ConfigKey[NB_SHORTCUTS] = {
true,
SDLK_g|MOD_SHIFT|MOD_ALT, // Shift + Alt + G,
0},
{159,
"Select layer 1",
"Makes the layer 1 visible and",
"set it as the active one, where",
"you can draw.",
true,
0,
0},
{160,
"Toggle layer 1",
"Makes layer 1 visible or invisible.",
"If it's the current active layer,",
"toggle all other layers instead.",
true,
0,
0},
{161,
"Select layer 2",
"Makes the layer 2 visible and",
"set it as the active one, where",
"you can draw.",
true,
0,
0},
{162,
"Toggle layer 2",
"Makes layer 2 visible or invisible.",
"If it's the current active layer,",
"toggle all other layers instead.",
true,
0,
0},
{163,
"Select layer 3",
"Makes the layer 3 visible and",
"set it as the active one, where",
"you can draw.",
true,
0,
0},
{164,
"Toggle layer 3",
"Makes layer 3 visible or invisible.",
"If it's the current active layer,",
"toggle all other layers instead.",
true,
0,
0},
{165,
"Select layer 4",
"Makes the layer 4 visible and",
"set it as the active one, where",
"you can draw.",
true,
0,
0},
{166,
"Toggle layer 4",
"Makes layer 4 visible or invisible.",
"If it's the current active layer,",
"toggle all other layers instead.",
true,
0,
0},
{167,
"Select layer 5",
"Makes the layer 5 visible and",
"set it as the active one, where",
"you can draw.",
true,
0,
0},
{168,
"Toggle layer 5",
"Makes layer 5 visible or invisible.",
"If it's the current active layer,",
"toggle all other layers instead.",
true,
0,
0},
{169,
"Select layer 6",
"Makes the layer 6 visible and",
"set it as the active one, where",
"you can draw.",
true,
0,
0},
{170,
"Toggle layer 6",
"Makes layer 6 visible or invisible.",
"If it's the current active layer,",
"toggle all other layers instead.",
true,
0,
0},
{171,
"Select layer 7",
"Makes the layer 7 visible and",
"set it as the active one, where",
"you can draw.",
true,
0,
0},
{172,
"Toggle layer 7",
"Makes layer 7 visible or invisible.",
"If it's the current active layer,",
"toggle all other layers instead.",
true,
0,
0},
{173,
"Select layer 8",
"Makes the layer 8 visible and",
"set it as the active one, where",
"you can draw.",
true,
0,
0},
{174,
"Toggle layer 8",
"Makes layer 8 visible or invisible.",
"If it's the current active layer,",
"toggle all other layers instead.",
true,
0,
0},
};
word Ordering[NB_SHORTCUTS]=
@ -1462,4 +1591,20 @@ word Ordering[NB_SHORTCUTS]=
SPECIAL_ZOOM_18, /**< Sets zoom factor to 18:1 */
SPECIAL_ZOOM_20, /**< Sets zoom factor to 20:1 */
SPECIAL_SHOW_GRID,
SPECIAL_LAYER1_SELECT,
SPECIAL_LAYER1_TOGGLE,
SPECIAL_LAYER2_SELECT,
SPECIAL_LAYER2_TOGGLE,
SPECIAL_LAYER3_SELECT,
SPECIAL_LAYER3_TOGGLE,
SPECIAL_LAYER4_SELECT,
SPECIAL_LAYER4_TOGGLE,
SPECIAL_LAYER5_SELECT,
SPECIAL_LAYER5_TOGGLE,
SPECIAL_LAYER6_SELECT,
SPECIAL_LAYER6_TOGGLE,
SPECIAL_LAYER7_SELECT,
SPECIAL_LAYER7_TOGGLE,
SPECIAL_LAYER8_SELECT,
SPECIAL_LAYER8_TOGGLE,
};