[−][src]Struct amethyst_window::DisplayConfig
Configuration for a window display.
Fields
title: StringName of the application window.
fullscreen: Option<MonitorIdent>Enables fullscreen mode on specific monitor when set.
Defaults to None, which means fullscreen is off.
dimensions: Option<(u32, u32)>Current window dimensions, measured in pixels (px).
min_dimensions: Option<(u32, u32)>Minimum window dimensions, measured in pixels (px).
max_dimensions: Option<(u32, u32)>Maximum window dimensions, measured in pixels (px).
visibility: boolWhether the window should be immediately visible upon creation.
icon: Option<PathBuf>A path to the icon used for the window.
If loaded_icon is present, this will be ignored.
always_on_top: boolWhether the window should always be on top of other windows.
decorations: boolWhether the window should have borders and bars.
maximized: boolWhether the window should be maximized upon creation.
multitouch: boolEnable multitouch on iOS.
resizable: boolWhether the window is resizable or not.
transparent: boolWhether the the window should be transparent. If this is true, writing colors with alpha values different than 1.0 will produce a transparent window.
loaded_icon: Option<Icon>A programmatically loaded window icon; not present in serialization.
Takes precedence over icon.
Examples
use amethyst_window::{DisplayConfig, Icon}; // First, create your `DisplayConfig` as usual let mut config = DisplayConfig::default(); // or load from file // Create the icon data let mut icon = Vec::new(); for _ in 0..(128 * 128) { icon.extend(vec![255, 0, 0, 255]); } // Set the `loaded_icon` field of the config // It will now be used as the window icon config.loaded_icon = Some(Icon::from_rgba(icon, 128, 128).unwrap()); // Now, feed this into the `GameDataBuilder` using // `.with_bundle(WindowBundle::from_config(config))`
Methods
impl DisplayConfig[src]
pub fn into_window_builder(
self,
monitors: &impl MonitorsAccess
) -> WindowBuilder[src]
self,
monitors: &impl MonitorsAccess
) -> WindowBuilder
Creates a winit::WindowBuilder using the values set in the DisplayConfig.
The MonitorsAccess is needed to configure a fullscreen window.
Trait Implementations
impl Default for DisplayConfig[src]
impl Eq for DisplayConfig[src]
impl Clone for DisplayConfig[src]
fn clone(&self) -> DisplayConfig[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl PartialEq<DisplayConfig> for DisplayConfig[src]
fn eq(&self, other: &DisplayConfig) -> bool[src]
fn ne(&self, other: &DisplayConfig) -> bool[src]
impl Debug for DisplayConfig[src]
impl<'de> Deserialize<'de> for DisplayConfig[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]
__D: Deserializer<'de>,
impl Serialize for DisplayConfig[src]
Auto Trait Implementations
impl Unpin for DisplayConfig
impl Sync for DisplayConfig
impl Send for DisplayConfig
impl UnwindSafe for DisplayConfig
impl RefUnwindSafe for DisplayConfig
Blanket Implementations
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Config for T where
T: Deserialize<'a> + Serialize + Default, [src]
T: Deserialize<'a> + Serialize + Default,
fn load<P>(path: P) -> T where
P: AsRef<Path>, [src]
P: AsRef<Path>,
fn load_no_fallback<P>(path: P) -> Result<T, ConfigError> where
P: AsRef<Path>, [src]
P: AsRef<Path>,
fn load_bytes(bytes: &[u8]) -> Result<T, ConfigError>[src]
fn write<P>(&self, path: P) -> Result<(), ConfigError> where
P: AsRef<Path>, [src]
P: AsRef<Path>,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>, [src]
T: Deserialize<'de>,
impl<T> Same<T> for T[src]
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>, [src]
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>[src]
fn is_in_subset(&self) -> bool[src]
unsafe fn to_subset_unchecked(&self) -> SS[src]
fn from_subset(element: &SS) -> SP[src]
impl<T> Resource for T where
T: Any + Send + Sync, [src]
T: Any + Send + Sync,
impl<T> Any for T where
T: Any, [src]
T: Any,
fn get_type_id(&self) -> TypeId[src]
impl<T> TryDefault for T where
T: Default, [src]
T: Default,
fn try_default() -> Result<T, String>[src]
fn unwrap_default() -> Self[src]
Calls try_default and panics on an error case.
impl<T> Event for T where
T: Send + Sync + 'static, [src]
T: Send + Sync + 'static,