Skip to content

Commit

Permalink
Adding Shift modifier to reverse chunk/block editor hotkeys.
Browse files Browse the repository at this point in the history
  • Loading branch information
MainMemory committed Apr 16, 2016
1 parent 83e987a commit 30bfc76
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 28 deletions.
25 changes: 20 additions & 5 deletions SonLVL/MainForm.cs
Expand Up @@ -3470,7 +3470,10 @@ private void ChunkPicture_KeyDown(object sender, KeyEventArgs e)
switch (e.KeyCode)
{
case Keys.B:
current.Block = (ushort)((current.Block + 1) % LevelData.Blocks.Count);
if (e.Shift)
current.Block = (ushort)(current.Block == 0 ? LevelData.Blocks.Count - 1 : current.Block - 1);
else
current.Block = (ushort)((current.Block + 1) % LevelData.Blocks.Count);
break;
case Keys.Down:
if (SelectedChunkBlock.Y < (LevelData.Level.ChunkHeight / 16) - 1)
Expand Down Expand Up @@ -3506,13 +3509,19 @@ private void ChunkPicture_KeyDown(object sender, KeyEventArgs e)
return;
break;
case Keys.S:
current.Solid1++;
if (e.Shift)
current.Solid1--;
else
current.Solid1++;
break;
case Keys.T:
if (!(current is S2ChunkBlock))
return;
S2ChunkBlock cur2 = (S2ChunkBlock)current;
cur2.Solid2++;
if (e.Shift)
cur2.Solid2--;
else
cur2.Solid2++;
break;
case Keys.Up:
if (SelectedChunkBlock.Y > 0)
Expand Down Expand Up @@ -3729,7 +3738,10 @@ private void BlockPicture_KeyDown(object sender, KeyEventArgs e)
switch (e.KeyCode)
{
case Keys.C:
current.Palette++;
if (e.Shift)
current.Palette--;
else
current.Palette++;
break;
case Keys.Down:
if (SelectedBlockTile.Y < 1)
Expand Down Expand Up @@ -3768,7 +3780,10 @@ private void BlockPicture_KeyDown(object sender, KeyEventArgs e)
return;
break;
case Keys.T:
current.Tile = (ushort)((current.Tile + 1) % LevelData.Tiles.Count);
if (e.Shift)
current.Tile = (ushort)(current.Tile == 0 ? LevelData.Tiles.Count - 1 : current.Tile - 1);
else
current.Tile = (ushort)((current.Tile + 1) % LevelData.Tiles.Count);
break;
case Keys.Up:
if (SelectedBlockTile.Y > 0)
Expand Down
53 changes: 30 additions & 23 deletions SonLVL/readme.txt
Expand Up @@ -10,27 +10,29 @@ Ctrl+Z: Undo
Ctrl+Y: Redo
Alt+Enter: Enable/Disable fullscreen mode.
F5: Show/Hide the menu.
Ctrl+1: Switch to Objects tab
Ctrl+2: Switch to Foreground tab
Ctrl+3: Switch to Background tab
Ctrl+4: Switch to Chunks tab
Ctrl+5: Switch to Blocks tab
Ctrl+6: Switch to Tiles tab
Ctrl+7: Switch to Solids tab
Q: Disable collision viewing
W: View collision path 1
E: View collision path 2
R: Toggle viewing of angle values
T: Toggle objects above/below high plane
Y: Toggle viewing of low plane
U: Toggle viewing of high plane
I: Toggle grid
O: Toggle HUD
P: Toggle viewing of objects from all timezones (Sonic CD only)
[: View previous palette
]: View next palette
-: Zoom out
+: Zoom in
Ctrl+Tab: Switch to next tab.
Ctrl+Shift+Tab: Switch to previous tab.
Ctrl+1: Switch to Objects tab.
Ctrl+2: Switch to Foreground tab.
Ctrl+3: Switch to Background tab.
Ctrl+4: Switch to Chunks tab.
Ctrl+5: Switch to Blocks tab.
Ctrl+6: Switch to Tiles tab.
Ctrl+7: Switch to Solids tab.
Q: Disable collision viewing.
W: View collision path 1.
E: View collision path 2.
R: Toggle viewing of angle values.
T: Toggle objects above/below high plane.
Y: Toggle viewing of low plane.
U: Toggle viewing of high plane.
I: Toggle grid.
O: Toggle HUD.
P: Toggle viewing of objects from all timezones (Sonic CD only).
[: View previous palette.
]: View next palette.
-: Zoom out.
+: Zoom in.

Object Editing:
Left click: Select an object or ring group. Hold Ctrl to select multiple objects.
Expand All @@ -45,8 +47,8 @@ A: Decrease type of all selected objects. (no undo)
Z: Increase type of all selected objects. (no undo)
S: Decrease subtype of all selected objects. (no undo)
X: Increase subtype of all selected objects. (no undo)
J: Increase grid size
M: Decrease grid size
J: Increase grid size.
M: Decrease grid size.
Ctrl+X: Cut selected objects.
Ctrl+Y: Copy selected objects.
Ctrl+V: Paste copied objects.
Expand All @@ -67,8 +69,11 @@ Up, Down, Left, Right: Change selected chunk block.
X: Flip horizontally.
Y: Flip vertically.
S: Increment solidity.
Shift+S: Decrement solidity.
T: Increment secondary solidity (S2/S3K chunks only).
Shift+T: Decrement secondary solidity (S2/S3K chunks only).
B: Increment block index.
Shift+B: Decrement block index.

Block Editing:
Click and drag blocks in the block list to re-order them, hold Ctrl to swap two blocks.
Expand All @@ -78,7 +83,9 @@ X: Flip horizontally.
Y: Flip vertically.
P: Toggle priority.
C: Increment palette.
Shift+C: Decrement palette.
T: Increment tile index.
Shift+T: Decrement tile index.

Tile Editing:
Click and drag tiles in the tile list to re-order them, hold Ctrl to swap two tiles.

0 comments on commit 30bfc76

Please sign in to comment.