GRID SNAP!
This commit is contained in:
parent
10b120512f
commit
f76cab4129
5 changed files with 66 additions and 11 deletions
10
src/main.rs
10
src/main.rs
|
@ -23,6 +23,7 @@ fn main() {
|
|||
.insert_resource(ButtonsColors::default())
|
||||
.insert_resource(UiState::default())
|
||||
.insert_resource(PointSize(6.0))
|
||||
.insert_resource(SnapGrid::default())
|
||||
;
|
||||
|
||||
app
|
||||
|
@ -40,13 +41,14 @@ fn main() {
|
|||
.add_system(modify_sys.with_run_criteria(|state: Res<UiState>, mut ec: ResMut<EguiContext>|
|
||||
if !ec.ctx_mut().is_pointer_over_area() && state.current_action == Action::Modify { ShouldRun::Yes } else { ShouldRun::No }
|
||||
))
|
||||
.add_system(action_bar_sys)
|
||||
.add_system(shape_tree_sys)
|
||||
.add_system(ui::action_bar_sys)
|
||||
.add_system(ui::shape_tree_sys)
|
||||
.add_system(show_hide_points)
|
||||
.add_system(color_points)
|
||||
.add_system(drag_camera_sys)
|
||||
.add_system(zoom_camera_sys)
|
||||
.add_system(scale_points)
|
||||
.add_system(ui::grid_window_sys)
|
||||
;
|
||||
|
||||
app.run();
|
||||
|
@ -78,8 +80,8 @@ fn zoom_camera_sys(
|
|||
|
||||
for mut op in cam.iter_mut() {
|
||||
op.scale += scroll ;
|
||||
if op.scale <= 0.0 {
|
||||
op.scale = 0.1;
|
||||
if op.scale <= 0.05 {
|
||||
op.scale = 0.05;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue