shape editing works now!(also moved to using Transform)

This commit is contained in:
RustyStriker 2022-07-28 11:33:02 +03:00
parent 01f7cfb6b7
commit f52c7b9057
4 changed files with 323 additions and 65 deletions

View file

@ -1,13 +1,19 @@
#![feature(let_chains)]
use bevy::prelude::*;
use bevy_egui::egui;
mod create;
mod helpers;
mod modify;
pub use modify::modify_sys;
pub use create::create_sys;
pub use helpers::*;
#[derive(Component, Debug, Clone, Copy)]
pub struct SPoint(pub Vec2);
#[derive(Clone, Debug)]
pub struct PointSize(pub f32);
#[derive(Component, Debug)]
pub struct ShapeData {
@ -21,12 +27,12 @@ pub struct ShapeData {
pub struct MainCamera;
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
pub enum CreateShape {
Triangle, Square, SquareCenter, Circle, Capsule
Triangle, Square, Circle, Capsule
}
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
pub enum Action {
Create, Modify, Delete
Create, Modify, Delete, Rotate
}
pub struct UiState {
pub current_action: Action,