pub struct GameConfig {Show 24 fields
pub game_name: String,
pub version: &'static str,
pub resolution: ResolutionConfig,
pub min_resolution: ResolutionConfig,
pub max_texture_dimension_2d_override: Option<u32>,
pub power_preference: PowerPreference,
pub scale_factor_override: Option<f32>,
pub fullscreen: bool,
pub target_framerate: u32,
pub vsync_enabled: bool,
pub desired_maximum_frame_latency: u32,
pub bloom_enabled: bool,
pub tonemapping_enabled: bool,
pub lighting: GlobalLightingParams,
pub lighting_enabled: bool,
pub wasm_append_id: Option<String>,
pub enable_dynamic_camera: bool,
pub enable_child_transforms: bool,
pub dev: DevConfig,
pub scroll_speed: f32,
pub music_enabled: bool,
pub blood_canvas_z: i32,
pub show_combat_text: bool,
pub spawn_exp: bool,
}
Fields§
§game_name: String
§version: &'static str
§resolution: ResolutionConfig
§min_resolution: ResolutionConfig
§max_texture_dimension_2d_override: Option<u32>
§power_preference: PowerPreference
Overrides wgpu
’s power preference for adapter selection. Should work around
a potential issue where when selecting wgpu::PowerPreference::HighPerformance
is on
and the user has a laptop with a dual GPU setup where the dedicated GPU is not enabled,
wgpu
would still choose it and then crash.
scale_factor_override: Option<f32>
Overrides the scale factor for the window. This is useful for making egui independent of the system UI scaling.
fullscreen: bool
Initial config for fullscreen, only works on game launch.
target_framerate: u32
§vsync_enabled: bool
§desired_maximum_frame_latency: u32
§bloom_enabled: bool
§tonemapping_enabled: bool
§lighting: GlobalLightingParams
§lighting_enabled: bool
§wasm_append_id: Option<String>
§enable_dynamic_camera: bool
§enable_child_transforms: bool
§dev: DevConfig
§scroll_speed: f32
§music_enabled: bool
§blood_canvas_z: i32
§show_combat_text: bool
§spawn_exp: bool
Trait Implementations§
Source§impl Clone for GameConfig
impl Clone for GameConfig
Source§fn clone(&self) -> GameConfig
fn clone(&self) -> GameConfig
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for GameConfig
impl Debug for GameConfig
Auto Trait Implementations§
impl Freeze for GameConfig
impl RefUnwindSafe for GameConfig
impl Send for GameConfig
impl Sync for GameConfig
impl Unpin for GameConfig
impl UnwindSafe for GameConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.