Scene in memory persistance and debug tools (#24)

![image](https://github.com/storytold/storyteller-bevy/assets/10954133/10eb5c33-2154-4e9d-95ce-1d8e8b822d22)
Debug tools example

---------

Co-authored-by: Danny McGee <dannymcgee@gmail.com>
This commit is contained in:
rewin
2024-02-02 22:51:18 +03:00
committed by GitHub
parent 2df86eaf58
commit 8f0b916eaa
15 changed files with 415 additions and 388 deletions
+12 -1
View File
@@ -320,8 +320,19 @@ fn read_mouse_delta(
// TODO: Make it configurable
fn send_undo_event(mut events: EventWriter<UndoRedo>, keyboard: Res<Input<KeyCode>>) {
if keyboard.pressed(KeyCode::ControlLeft) && keyboard.just_pressed(KeyCode::Z) {
if keyboard.pressed(KeyCode::ControlLeft)
&& keyboard.just_pressed(KeyCode::Z)
&& !keyboard.pressed(KeyCode::ShiftLeft)
{
events.send(UndoRedo::Undo);
info!("Undo event sent");
}
if keyboard.pressed(KeyCode::ControlLeft)
&& keyboard.just_pressed(KeyCode::Z)
&& keyboard.pressed(KeyCode::ShiftLeft)
{
events.send(UndoRedo::Redo);
info!("Redo event sent");
}
}