diff --git a/README.md b/README.md index baa20b9..46bbe6e 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ logic mostly like https://git.crispypin.cc/CrispyPin/marble ## todo - undo/redo - more levels -- make power propagation not recursive +- make direct power (gate -> machine) work, (needs storing power direction in machine tiles) - story/lore - cut selections, copy to system clipboard - timestamps in solutions and blueprints diff --git a/src/editor.rs b/src/editor.rs index 25da17a..1934a87 100644 --- a/src/editor.rs +++ b/src/editor.rs @@ -394,10 +394,15 @@ impl Editor { self.zoom_out(rl); } } - if rl.is_mouse_button_down(MouseButton::MOUSE_BUTTON_MIDDLE) { - self.view_offset += rl.get_mouse_delta(); + if rl.is_mouse_button_down(MouseButton::MOUSE_BUTTON_RIGHT) { + let speed = if rl.is_key_down(KeyboardKey::KEY_LEFT_SHIFT) { + 4. + } else { + 1. + }; + self.view_offset += rl.get_mouse_delta() * speed; } - if rl.is_mouse_button_pressed(MouseButton::MOUSE_BUTTON_RIGHT) { + if rl.is_key_pressed(KeyboardKey::KEY_HOME) { self.center_view(rl); }