pub struct SettingsUI {
pub visible: bool,
/* private fields */
}Expand description
Settings UI manager using egui
Fields§
§visible: boolWhether the settings window is currently visible
Implementations§
Source§impl SettingsUI
impl SettingsUI
Sourcepub fn refresh_shaders(&mut self)
pub fn refresh_shaders(&mut self)
Refresh the list of available shaders
Sourcepub fn set_shader_error(&mut self, error: Option<String>)
pub fn set_shader_error(&mut self, error: Option<String>)
Set shader compilation error (called from app when shader fails to compile)
Sourcepub fn clear_shader_error(&mut self)
pub fn clear_shader_error(&mut self)
Clear shader error
Sourcepub fn open_shader_editor(&mut self) -> bool
pub fn open_shader_editor(&mut self) -> bool
Open the shader editor directly (without opening settings)
Returns true if the editor was opened, false if no shader path is configured
Sourcepub fn is_shader_editor_visible(&self) -> bool
pub fn is_shader_editor_visible(&self) -> bool
Check if shader editor is visible
Sourcepub fn update_config(&mut self, config: Config)
pub fn update_config(&mut self, config: Config)
Update the config copy (e.g., when config is reloaded)
Sourcepub fn current_config(&self) -> &Config
pub fn current_config(&self) -> &Config
Get a reference to the working config (for live sync)
Sourcepub fn show(
&mut self,
ctx: &Context,
) -> (Option<Config>, Option<Config>, Option<ShaderEditorResult>)
pub fn show( &mut self, ctx: &Context, ) -> (Option<Config>, Option<Config>, Option<ShaderEditorResult>)
Show the settings window and return (Option<config_to_save>, Option<config_for_live_update>, Option
- First Option: Some(config) if save was clicked (persist to disk)
- Second Option: Some(config) if any changes were made (apply immediately)
- Third Option: Some(ShaderEditorResult) if shader Apply was clicked
Auto Trait Implementations§
impl Freeze for SettingsUI
impl RefUnwindSafe for SettingsUI
impl Send for SettingsUI
impl Sync for SettingsUI
impl Unpin for SettingsUI
impl UnwindSafe for SettingsUI
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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.Source§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.Source§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.Source§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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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