Add Fast Zoom In & Out functions.
Shift +/- or Shift Mouse Wheel http://pulkomandy.tk/projects/GrafX2/ticket/28
This commit is contained in:
parent
e36cff0fef
commit
753aaf3422
@ -540,6 +540,8 @@ enum SPECIAL_ACTIONS
|
||||
SPECIAL_FORMAT_CHECKER_MENU,
|
||||
|
||||
SPECIAL_HOLD_PAN,
|
||||
SPECIAL_ZOOM_IN_MORE,
|
||||
SPECIAL_ZOOM_OUT_MORE,
|
||||
|
||||
NB_SPECIAL_SHORTCUTS ///< Number of special shortcuts
|
||||
};
|
||||
|
||||
@ -1036,10 +1036,19 @@ void Main_handler(void)
|
||||
Zoom(+1);
|
||||
action++;
|
||||
break;
|
||||
case SPECIAL_ZOOM_IN_MORE :
|
||||
Zoom(+3);
|
||||
action++;
|
||||
break;
|
||||
case SPECIAL_ZOOM_OUT : // Zoom out
|
||||
Zoom(-1);
|
||||
action++;
|
||||
break;
|
||||
case SPECIAL_ZOOM_OUT_MORE :
|
||||
Zoom(-3);
|
||||
action++;
|
||||
break;
|
||||
|
||||
case SPECIAL_CENTER_ATTACHMENT : // Center brush attachment
|
||||
Hide_cursor();
|
||||
Brush_offset_X=(Brush_width>>1);
|
||||
|
||||
@ -225,7 +225,9 @@ static const T_Help_table helptable_help[] =
|
||||
HELP_LINK (" Toggle: %s", 0x100+BUTTON_MAGNIFIER)
|
||||
HELP_LINK (" Zoom factor menu: %s", 0x200+BUTTON_MAGNIFIER)
|
||||
HELP_LINK (" Zoom in: %s", SPECIAL_ZOOM_IN)
|
||||
HELP_LINK (" Zoom in more: %s", SPECIAL_ZOOM_IN_MORE)
|
||||
HELP_LINK (" Zoom out: %s", SPECIAL_ZOOM_OUT)
|
||||
HELP_LINK (" Zoom out more: %s", SPECIAL_ZOOM_OUT_MORE)
|
||||
HELP_LINK (" 1:1 (off) %s", SPECIAL_ZOOM_1)
|
||||
HELP_LINK (" 2:1 %s", SPECIAL_ZOOM_2)
|
||||
HELP_LINK (" 3:1 %s", SPECIAL_ZOOM_3)
|
||||
@ -1966,7 +1968,9 @@ static const T_Help_table helptable_magnifier[] =
|
||||
HELP_TEXT ("window. If you're already in magnifier mode,")
|
||||
HELP_TEXT ("you'll return to normal mode.")
|
||||
HELP_LINK ("Zoom in : %s",SPECIAL_ZOOM_IN)
|
||||
HELP_LINK ("Zoom in more : %s",SPECIAL_ZOOM_IN_MORE)
|
||||
HELP_LINK ("Zoom out: %s",SPECIAL_ZOOM_OUT)
|
||||
HELP_LINK ("Zoom out more : %s",SPECIAL_ZOOM_OUT_MORE)
|
||||
HELP_TEXT ("")
|
||||
HELP_BOLD ("RIGHT CLICK")
|
||||
HELP_LINK ("(Key:%s)",0x200+BUTTON_MAGNIFIER)
|
||||
|
||||
@ -1823,6 +1823,22 @@ T_Key_config ConfigKey[NB_SHORTCUTS] = {
|
||||
SDLK_SPACE, // Space
|
||||
#endif
|
||||
0},
|
||||
{209,
|
||||
"Zoom in more",
|
||||
"Increase magnifying factor more.",
|
||||
"",
|
||||
"",
|
||||
true,
|
||||
SDLK_KP_PLUS|MOD_SHIFT, // Shift++
|
||||
KEY_MOUSEWHEELUP|MOD_SHIFT},
|
||||
{210,
|
||||
"Zoom out more",
|
||||
"Increase magnifying factor more.",
|
||||
"",
|
||||
"",
|
||||
true,
|
||||
SDLK_KP_MINUS|MOD_SHIFT, // Shift+-
|
||||
KEY_MOUSEWHEELDOWN|MOD_SHIFT},
|
||||
};
|
||||
|
||||
word Ordering[NB_SHORTCUTS]=
|
||||
@ -2037,4 +2053,6 @@ word Ordering[NB_SHORTCUTS]=
|
||||
0x100+BUTTON_ANIM_NEXT_FRAME,
|
||||
0x100+BUTTON_ANIM_PLAY, // Unused at this time
|
||||
SPECIAL_HOLD_PAN,
|
||||
SPECIAL_ZOOM_IN_MORE, // Zoom in more
|
||||
SPECIAL_ZOOM_OUT_MORE, // Zoom out more
|
||||
};
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
#endif
|
||||
#include <SDL.h>
|
||||
|
||||
#define NB_SHORTCUTS 210 ///< Number of actions that can have a key combination associated to it.
|
||||
#define NB_SHORTCUTS 212 ///< Number of actions that can have a key combination associated to it.
|
||||
|
||||
/*** Types definitions and structs ***/
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user