pub struct Editor {Show 30 fields
pub edit: SceneEdit,
pub files: Files,
pub history: History,
pub viewport: Box<Viewport>,
pub sources: BTreeMap<PathBuf, Source>,
pub problems: Vec<Diagnostic>,
pub outline: Outline,
pub raw: Raw,
pub rows: Vec<Row>,
pub selection: Option<Item>,
pub trace: bool,
pub trace_samples: u32,
pub play: Play,
pub log: Log,
pub app: String,
pub pgpu: Option<String>,
pub muted: bool,
pub sound_available: bool,
pub sound: Option<String>,
pub screen: Rect,
pub texture: Option<TextureId>,
pub revision: u64,
pub layout: Layout,
pub texts: BTreeMap<String, String>,
pub saves: Vec<PathBuf>,
pub outside: bool,
pub project: Option<Project>,
pub tunables: Tunables,
pub live: BTreeMap<String, Value>,
pub level: Level,
/* private fields */
}Fields§
§edit: SceneEdit§files: Files§history: History§viewport: Box<Viewport>§sources: BTreeMap<PathBuf, Source>§problems: Vec<Diagnostic>§outline: Outline§raw: Raw§rows: Vec<Row>§selection: Option<Item>§trace: bool§trace_samples: u32§play: Play§log: Log§app: String§pgpu: Option<String>§muted: bool§sound_available: bool§sound: Option<String>§screen: Rect§texture: Option<TextureId>§revision: u64§layout: Layout§texts: BTreeMap<String, String>§saves: Vec<PathBuf>§outside: bool§project: Option<Project>§tunables: Tunables§live: BTreeMap<String, Value>§level: LevelImplementations§
Source§impl Editor
impl Editor
pub fn open(path: impl AsRef<Path>) -> Result<Editor, String>
pub fn scene(&self) -> &Scene
pub fn path(&self) -> &Path
pub fn project_root(&self) -> &Path
pub fn name(&self) -> String
pub fn files(&self) -> Vec<PathBuf>
pub fn refresh(&mut self)
pub fn select(&mut self, item: Option<Item>)
pub fn open_scene(&mut self, scene: PathBuf)
pub fn set_project(&mut self, project: Project)
pub fn frame_project(&mut self)
pub fn selected_object(&self) -> Option<&str>
pub fn editable(&self) -> bool
pub fn dry(&mut self, change: &Change) -> Result<PatchGroup, String>
pub fn play_edit(&mut self, session: &mut PlaySession, change: &Change) -> bool
pub fn stopped(&mut self, keep: Option<&Pending>)
pub fn keep(&mut self, pending: &Pending)
pub fn change(&mut self, change: Change, group: Group)
pub fn land(&mut self, group: PatchGroup)
pub fn end_group(&mut self)
pub fn grouping(&self) -> bool
pub fn save(&mut self, changed: &Changed) -> bool
pub fn wrote(&mut self, changed: &Changed)
pub fn undo(&mut self)
pub fn redo(&mut self)
pub fn typed(&mut self, changed: Option<Changed>)
pub fn reloaded(&mut self)
pub fn events(&mut self)
pub fn source(&mut self, file: &Path) -> &mut Source
pub fn toggle_view(&mut self)
pub fn focus(&mut self)
pub fn request(&mut self, request: Request)
pub fn take_requests(&mut self) -> Vec<Request>
pub fn step_selection(&mut self, by: isize)
pub fn play_pressed(&mut self)
Source§impl Editor
impl Editor
pub fn relative(&self, file: &Path) -> String
pub fn layers(&self) -> Vec<Tiles>
pub fn is_cell(&self, object: &str) -> bool
pub fn surfaces(&mut self) -> Option<&Surfaces>
pub fn lens(&self) -> Option<Lens>
pub fn extent(&mut self, asset: &Path) -> Result<[[f32; 3]; 2], String>
pub fn aim(&mut self, asset: &Path, at: Pos2) -> Result<Aim, String>
pub fn place(&mut self, asset: &Path, at: Pos2) -> Option<String>
pub fn place_at( &mut self, asset: &Path, at: [f32; 3], rotate: [f32; 3], ) -> Result<String, String>
pub fn picked(&self) -> Vec<String>
pub fn pick_more(&mut self, name: &str)
pub fn duplicate(&mut self) -> Vec<String>
pub fn align(&mut self, axis: usize, to_last: bool) -> bool
pub fn distribute(&mut self, axis: usize) -> bool
pub fn brush_layer(&self) -> Option<Tiles>
pub fn brush_prefab(&mut self) -> Option<String>
pub fn cell_under(&mut self, at: Pos2) -> Option<[i32; 2]>
pub fn paint( &mut self, cells: &[[i32; 2]], erase: bool, ) -> Result<usize, String>
pub fn pick_cell(&mut self, cell: [i32; 2]) -> Option<String>
pub fn finish_stroke(&mut self)
pub fn toggle_brush(&mut self)
Source§impl Editor
impl Editor
pub fn level_keys(&mut self, ctx: &Context, inside: bool)
pub fn snap_gizmo(&mut self)
pub fn level_viewport(&mut self, ui: &mut Ui, image: Rect)
pub fn level_panel(&mut self, ui: &mut Ui) -> bool
Auto Trait Implementations§
impl Freeze for Editor
impl !RefUnwindSafe for Editor
impl !Send for Editor
impl !Sync for Editor
impl Unpin for Editor
impl UnsafeUnpin for Editor
impl !UnwindSafe for Editor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<F, T, S> SimdInto<T, S> for Fwhere
T: SimdFrom<F, S>,
S: Simd,
impl<F, T, S> SimdInto<T, S> for Fwhere
T: SimdFrom<F, S>,
S: Simd,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.