]> git.lizzy.rs Git - nothing.git/commitdiff
(tsoding/nothing#914) document level editor key bindings
authorDanil Kolumbet <kolumbetko@gmail.com>
Sat, 14 Dec 2019 15:02:23 +0000 (17:02 +0200)
committerDanil Kolumbet <kolumbetko@gmail.com>
Sat, 14 Dec 2019 15:02:23 +0000 (17:02 +0200)
README.md
src/game/level/level_editor.c

index ec642c5854920411800da2d30668f67826019a43..564e4cef2624e1751fc3698c7fa45cf9e233293a 100644 (file)
--- a/README.md
+++ b/README.md
@@ -128,18 +128,18 @@ $ ./nothing
 
 #### Keyboard
 
-| Key      | Action                                                      |
-|----------|-------------------------------------------------------------|
-| `d`      | Move to the right                                           |
-| `a`      | Move to the left                                            |
-| `SPACE`  | Jump                                                        |
-| `c`      | Open debug console                                          |
-| `r`      | Reload the current level including the Player's position    |
-| `q`      | Reload the current level preserving the Player's position   |
-| `p`      | Toggle game pause                                           |
-| `l`      | Toggle transparency on objects. Useful for debugging levels |
-| `TAB`    | Switch to Level Editor                                      |
-| `CTRL+q` | Quit the game                                               |
+| Key       | Action                                                      |
+|---------- |-------------------------------------------------------------|
+| `d`       | Move to the right                                           |
+| `a`       | Move to the left                                            |
+| `w/SPACE` | Jump                                                        |
+| `c`       | Open debug console                                          |
+| `r`       | Reload the current level including the Player's position    |
+| `q`       | Reload the current level preserving the Player's position   |
+| `p`       | Toggle game pause                                           |
+| `l`       | Toggle transparency on objects. Useful for debugging levels |
+| `TAB`     | Switch to Level Editor                                      |
+| `CTRL+q`  | Quit the game                                               |
 
 #### Gamepad
 
@@ -156,15 +156,22 @@ $ ./nothing
 | `Enter`   | Evaluate the expression  |
 | `Up/Down` | Traverse console history |
 
-<!-- TODO(#914): Level Editor is not documented -->
-
 ### Level Editor
 
 To access the Level Editor open a level and press `TAB`.
 
-| Key  | Action                 |
-|------|------------------------|
-| `F2` | Rename selected object |
+| Key             | Action                                     |
+|-----------------|--------------------------------------------|
+| `s`             | Save level                                 |
+| `Mouse Wheel`   | Zoom and pan                               |
+| `CTRL+z`        | Undo                                       |
+| `q`             | Toggle snapping mode                       |
+| `SHIFT`         | Fix original aspect ratio while scaling    |
+| `CTRL`          | Fix aspect ratio 1:1 while scaling         |
+| `SHIFT+Up/Down` | Change overlaping order of selected object |
+| `CTRL+c/v`      | Copy/paste selected object                 |
+| `F2`            | Rename selected object                     |
+| `DELETE`        | Delete selected object                     |
 
 ## Support
 
index 662bd2911dd4bcc1be55bedbfb3e0b76471c3e87..d4d1cf69eb40c660a8d123f19242bece020ecaff 100644 (file)
@@ -392,7 +392,7 @@ int level_editor_saveas_event(LevelEditor *level_editor,
             snprintf(
                 path,
                 LEVEL_FOLDER_MAX_LENGTH,
-                "./assets/levels//%s.txt",
+                "./assets/levels/%s.txt",
                 edit_field_as_text(level_editor->edit_field_filename));
             level_editor->file_name = PUSH_LT(
                 level_editor->lt,