Shift + arrow keys now steps 8 steps instead of 1
This commit is contained in:
parent
d120a27fdc
commit
e3a04b6e21
@ -108,7 +108,7 @@ void Editor_update()
|
||||
static char s_editBuffer[512];
|
||||
static bool is_editing = false;
|
||||
|
||||
bool Editor_keyDown(int key)
|
||||
bool Editor_keyDown(int key, int modifiers)
|
||||
{
|
||||
bool handled_key = true;
|
||||
bool paused = RemoteConnection_isPaused();
|
||||
@ -119,8 +119,12 @@ bool Editor_keyDown(int key)
|
||||
{
|
||||
if (paused)
|
||||
{
|
||||
int row = ++s_editorData.trackViewInfo.rowPos;
|
||||
RemoteConnection_sendSetRowCommand(row);
|
||||
if (modifiers)
|
||||
s_editorData.trackViewInfo.rowPos += 8;
|
||||
else
|
||||
s_editorData.trackViewInfo.rowPos++;
|
||||
|
||||
RemoteConnection_sendSetRowCommand(s_editorData.trackViewInfo.rowPos);
|
||||
handled_key = true;
|
||||
}
|
||||
|
||||
@ -131,15 +135,15 @@ bool Editor_keyDown(int key)
|
||||
{
|
||||
if (paused)
|
||||
{
|
||||
int row = --s_editorData.trackViewInfo.rowPos;
|
||||
if (modifiers)
|
||||
s_editorData.trackViewInfo.rowPos -= 8;
|
||||
else
|
||||
s_editorData.trackViewInfo.rowPos--;
|
||||
|
||||
if (s_editorData.trackViewInfo.rowPos < 0)
|
||||
{
|
||||
s_editorData.trackViewInfo.rowPos = 0;
|
||||
row = 0;
|
||||
}
|
||||
|
||||
RemoteConnection_sendSetRowCommand(row);
|
||||
RemoteConnection_sendSetRowCommand(s_editorData.trackViewInfo.rowPos);
|
||||
handled_key = true;
|
||||
}
|
||||
break;
|
||||
|
||||
@ -5,7 +5,7 @@ void Editor_destroy();
|
||||
void Editor_init();
|
||||
void Editor_update();
|
||||
void Editor_timedUpdate();
|
||||
bool Editor_keyDown(int keyCode);
|
||||
bool Editor_keyDown(int keyCode, int mod);
|
||||
void Editor_menuEvent(int menuItem);
|
||||
|
||||
enum
|
||||
|
||||
@ -71,6 +71,10 @@
|
||||
keyChar = [key characterAtIndex:0];
|
||||
|
||||
int keyCode = keyChar;
|
||||
int specialKeys = 0;
|
||||
|
||||
if ([theEvent modifierFlags] & NSShiftKeyMask)
|
||||
specialKeys = 1;
|
||||
|
||||
if ([theEvent modifierFlags] & NSNumericPadKeyMask)
|
||||
{
|
||||
@ -83,7 +87,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
if (!Editor_keyDown(keyCode))
|
||||
if (!Editor_keyDown(keyCode, specialKeys))
|
||||
[super keyDown:theEvent];
|
||||
|
||||
Editor_update();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user