Only left alt enters command mode. Wip.

This commit is contained in:
Scott Wadden 2023-12-10 20:03:48 -04:00
parent cb60c06614
commit eb6121c683
6 changed files with 20 additions and 19 deletions

View File

@ -184,11 +184,6 @@ toggle_console={
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":96,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
]
}
command_mode={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777240,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
]
}
run={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777237,"physical_scancode":0,"unicode":0,"echo":false,"script":null)

View File

@ -15,7 +15,7 @@
- `1` - enter edit mode.
- `2 - 9` - change active action.
- `Mouse Wheel Up` / `Down` - change active action.
- `Alt` / `Option` - reload script changes. Hold to temporarily capture the
- `Left Alt` / `Left Option` - reload script changes. Hold to temporarily capture the
mouse and move, so you can change your view without having to switch away from
what you're doing.
- `Cmd`+`P` / `Ctrl`+`P` - Pause scripts.

View File

@ -13,7 +13,7 @@ controller.
Close help or code windows with `ESC` on your keyboard or `B` on your
controller. You can also move without closing the window by using your
controller, or by holding down `alt/option (⌥)` on your keyboard.
controller, or by holding down left `alt/option (⌥)` on your keyboard.
## Jumping and Flying
@ -79,9 +79,10 @@ turn left
forward 20
```
Run your code by pressing `alt/option (⌥)`. Keep `alt/option (⌥)` held down to
move around while you're coding. Flying is a great way to get yourself into
position to see what's happening, so try double jumping to get a better view.
Run your code by pressing left `alt/option (⌥)`. Keep left `alt/option (⌥)` held
down to move around while you're coding. Flying is a great way to get yourself
into position to see what's happening, so try double jumping to get a better
view.
If your `Bot` is moving too slowly for your tastes, make her run by setting the
`speed` value.

View File

@ -341,6 +341,14 @@ Trying to connect to {state.config.connect_address}.
state.config_value.value: level_dir = current_level
method unhandled_input*(event: InputEvent) =
if event of InputEventKey:
let event = InputEventKey(event)
if host_os == "macosx" and event.raw_code == 58:
if event.pressed:
state.push_flag CommandMode
else:
state.pop_flag CommandMode
if EditorVisible in state.local_flags or DocsVisible in state.local_flags or
ConsoleVisible in state.local_flags:
@ -372,10 +380,6 @@ Trying to connect to {state.config.connect_address}.
self.switch_world(+1)
elif event.is_action_pressed("prev_level"):
self.switch_world(-1)
elif event.is_action_pressed("command_mode"):
state.push_flag CommandMode
elif event.is_action_released("command_mode"):
state.pop_flag CommandMode
elif event.is_action_pressed("save_and_reload"):
state.pop_flag Playing
state.push_flag ResettingVM

2
vendor/godot vendored

@ -1 +1 @@
Subproject commit bafcac7c87e56fe70a87758f6098bae1a0ac8024
Subproject commit c0c7ae20169730605290f7a504dd517afbbf4f93

View File

@ -58,7 +58,7 @@ controller.
You can close this window by pressing `ESC` on your keyboard or `B` on your
controller, and can come back at any time by clicking on the text block next to
the `Bot`. You can also move without closing the window by using your
controller, or by holding down `alt/option (⌥)` on your keyboard.
controller, or by holding down left `alt/option (⌥)` on your keyboard.
Sneak behind the `Bot` to continue the tutorial.
@ -218,9 +218,10 @@ turn left
Please finish the code to get the `Bot` get to the end of the course.
Run your code by pressing `alt/option (⌥)`. Keep `alt/option (⌥)` held down to
move around while you're coding. Flying is a great way to get yourself into
position to see what's happening, so try double jumping to get a better view.
Run your code by pressing left `alt/option (⌥)`. Keep left `alt/option (⌥)` held
down to move around while you're coding. Flying is a great way to get yourself
into position to see what's happening, so try double jumping to get a better
view.
If your `Bot` is moving too slowly for your tastes, make her run by setting the
`speed` value.