Struct bevy_egui::EguiSettings [−][src]
pub struct EguiSettings { pub scale_factor: f64, }
A resource for storing global UI settings.
Fields
scale_factor: f64
Global scale factor for egui widgets (1.0
by default).
This setting can be used to force the UI to render in physical pixels regardless of DPI as follows:
use bevy::prelude::*; use bevy_egui::EguiSettings; fn update_ui_scale_factor(mut egui_settings: ResMut<EguiSettings>, windows: Res<Windows>) { if let Some(window) = windows.get_primary() { egui_settings.scale_factor = 1.0 / window.scale_factor(); } }
Trait Implementations
impl Clone for EguiSettings
[src]
impl Clone for EguiSettings
[src]fn clone(&self) -> EguiSettings
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for EguiSettings
[src]
impl Default for EguiSettings
[src]impl PartialEq<EguiSettings> for EguiSettings
[src]
impl PartialEq<EguiSettings> for EguiSettings
[src]fn eq(&self, other: &EguiSettings) -> bool
[src]
fn ne(&self, other: &EguiSettings) -> bool
[src]
impl StructuralPartialEq for EguiSettings
[src]
impl StructuralPartialEq for EguiSettings
[src]Auto Trait Implementations
impl RefUnwindSafe for EguiSettings
impl RefUnwindSafe for EguiSettings
impl Send for EguiSettings
impl Send for EguiSettings
impl Sync for EguiSettings
impl Sync for EguiSettings
impl Unpin for EguiSettings
impl Unpin for EguiSettings
impl UnwindSafe for EguiSettings
impl UnwindSafe for EguiSettings
Blanket Implementations
impl<T> Any for T where
T: Any,
impl<T> Any for T where
T: Any,
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
impl<T> FromWorld for T where
T: Default,
impl<T> FromWorld for T where
T: Default,
pub fn from_world(_world: &mut World) -> T
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> TypeData for T where
T: 'static + Send + Sync + Clone,
impl<T> TypeData for T where
T: 'static + Send + Sync + Clone,
pub fn clone_type_data(&self) -> Box<dyn TypeData + 'static, Global>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,