Support for "Shifted" punctuation keys in TextEntry.
This commit is contained in:
@@ -22,6 +22,12 @@ BUG FIX: Fixed ez2 real style spacing
|
|||||||
CHANGE: #SAMPLESTART tag now written in DWI files
|
CHANGE: #SAMPLESTART tag now written in DWI files
|
||||||
CHANGE: Editor now snaps while recording
|
CHANGE: Editor now snaps while recording
|
||||||
OPTIMIZATION: More efficient texture memory usage
|
OPTIMIZATION: More efficient texture memory usage
|
||||||
|
BUG FIX: Text entry now supports puntuation while holding Shift
|
||||||
|
CHANGE: AutoGen now only generated dance->pump and pump->dance to cut
|
||||||
|
down on initial load time
|
||||||
|
CHANGE: Texure cache disabled because of performance problems on low memory
|
||||||
|
systems. If you have >= 128MB memory, you may want re-enable it by
|
||||||
|
setting UnloadTextureDelaySeconds=1800.
|
||||||
|
|
||||||
------------------------CVS after 3.00 beta 6----------------
|
------------------------CVS after 3.00 beta 6----------------
|
||||||
CHANGE: Missing a jump with the Oni life meter now subtracts only 1 life.
|
CHANGE: Missing a jump with the Oni life meter now subtracts only 1 life.
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ const CString SHORTCUT_TEXT = "";
|
|||||||
/* "S: save changes\n"
|
/* "S: save changes\n"
|
||||||
"W: save as SM and DWI (lossy)\n"
|
"W: save as SM and DWI (lossy)\n"
|
||||||
"Enter/Space: set begin/end selection markers\n"
|
"Enter/Space: set begin/end selection markers\n"
|
||||||
"G/H/J/K/L: Snap selection to nearest\n"
|
"G/H/J/K/L: Quantize selection to nearest\n"
|
||||||
" 4th / 8th / 12th / 16th / 12th or 16th\n"
|
" 4th / 8th / 12th / 16th / 12th or 16th\n"
|
||||||
"P: Play selected area\n"
|
"P: Play selected area\n"
|
||||||
"R: Record in selected area\n"
|
"R: Record in selected area\n"
|
||||||
@@ -116,11 +116,11 @@ const CString ACTION_MENU_ITEM_TEXT[NUM_ACTION_MENU_ITEMS] = {
|
|||||||
"B: Add/Edit background change at current beat",
|
"B: Add/Edit background change at current beat",
|
||||||
"Ins: Insert blank beat and shift down",
|
"Ins: Insert blank beat and shift down",
|
||||||
"Del: Delete blank beat and shift up",
|
"Del: Delete blank beat and shift up",
|
||||||
"G: Snap selection to nearest quarter note",
|
"G: Quantize selection to 4th notes",
|
||||||
"H: Snap selection to nearest eighth note",
|
"H: Quantize selection to 8th notes",
|
||||||
"J: Snap selection to nearest triplet",
|
"J: Quantize selection to 12th notes",
|
||||||
"K: Snap selection to nearest sixteenth note",
|
"K: Quantize selection to 16th notes",
|
||||||
"L: Snap selection to nearest triplet or sixteenth note",
|
"L: Quantize selection to 12th or 16th notes",
|
||||||
"M: Play sample music",
|
"M: Play sample music",
|
||||||
"S: Save changes as SM and DWI",
|
"S: Save changes as SM and DWI",
|
||||||
"Q: Quit"
|
"Q: Quit"
|
||||||
|
|||||||
@@ -96,15 +96,48 @@ void ScreenTextEntry::Input( const DeviceInput& DeviceI, const InputEventType ty
|
|||||||
default:
|
default:
|
||||||
char c;
|
char c;
|
||||||
c = DeviceI.ToChar();
|
c = DeviceI.ToChar();
|
||||||
if( INPUTFILTER->IsBeingPressed(DeviceInput(DEVICE_KEYBOARD, DIK_LSHIFT)) ||
|
|
||||||
INPUTFILTER->IsBeingPressed(DeviceInput(DEVICE_KEYBOARD, DIK_RSHIFT)))
|
bool bHoldingShift =
|
||||||
|
INPUTFILTER->IsBeingPressed(DeviceInput(DEVICE_KEYBOARD, DIK_LSHIFT)) ||
|
||||||
|
INPUTFILTER->IsBeingPressed(DeviceInput(DEVICE_KEYBOARD, DIK_RSHIFT));
|
||||||
|
|
||||||
|
// International keyboards often have other keys mapped to shifted keys, and always
|
||||||
|
// using a US layout is a bit gimped. This is better than nothing though.
|
||||||
|
if( bHoldingShift )
|
||||||
{
|
{
|
||||||
c = (char)toupper(c);
|
c = (char)toupper(c);
|
||||||
|
|
||||||
|
switch( c )
|
||||||
|
{
|
||||||
|
case '`': c='~'; break;
|
||||||
|
case '1': c='!'; break;
|
||||||
|
case '2': c='@'; break;
|
||||||
|
case '3': c='#'; break;
|
||||||
|
case '4': c='$'; break;
|
||||||
|
case '5': c='%'; break;
|
||||||
|
case '6': c='^'; break;
|
||||||
|
case '7': c='&'; break;
|
||||||
|
case '8': c='*'; break;
|
||||||
|
case '9': c='('; break;
|
||||||
|
case '0': c=')'; break;
|
||||||
|
case '-': c='_'; break;
|
||||||
|
case '=': c='+'; break;
|
||||||
|
case '[': c='{'; break;
|
||||||
|
case ']': c='}'; break;
|
||||||
|
case '\\': c='|'; break;
|
||||||
|
case ';': c=':'; break;
|
||||||
|
case '\'': c='"'; break;
|
||||||
|
case ',': c='<'; break;
|
||||||
|
case '.': c='>'; break;
|
||||||
|
case '/': c='?'; break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( c != '\0' )
|
if( c != '\0' )
|
||||||
|
{
|
||||||
m_sAnswer += c;
|
m_sAnswer += c;
|
||||||
m_textAnswer.SetText( m_sAnswer );
|
m_textAnswer.SetText( m_sAnswer );
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user