Struct ggez::ContextBuilder [−][src]
pub struct ContextBuilder { /* fields omitted */ }
A builder object for creating a context.
Can do everything the Context::load_from_conf()
method does, plus you can
also specify new paths to add to the resource path list at build time instead
of using filesystem::mount()
.
Methods
impl ContextBuilder
[src]
impl ContextBuilder
pub fn new(game_id: &'static str, author: &'static str) -> Self
[src]
pub fn new(game_id: &'static str, author: &'static str) -> Self
Create a new ContextBuilder
pub fn window_setup(self, setup: WindowSetup) -> Self
[src]
pub fn window_setup(self, setup: WindowSetup) -> Self
Sets the window setup settings
pub fn window_mode(self, mode: WindowMode) -> Self
[src]
pub fn window_mode(self, mode: WindowMode) -> Self
Sets the window mode settings
pub fn backend(self, backend: Backend) -> Self
[src]
pub fn backend(self, backend: Backend) -> Self
Sets the graphics backend
pub fn add_resource_path<T>(self, path: T) -> Self where
T: Into<PathBuf>,
[src]
pub fn add_resource_path<T>(self, path: T) -> Self where
T: Into<PathBuf>,
Add a new read-only filesystem path to the places to search for resources.
pub fn with_conf_file(self, load_conf_file: bool) -> Self
[src]
pub fn with_conf_file(self, load_conf_file: bool) -> Self
Specifies whether or not to load the conf.toml
file if it
exists and use its settings to override the provided values.
Defaults to true
which is usually what you want, but being
able to fiddle with it is sometimes useful for debugging.
pub fn build(self) -> GameResult<Context>
[src]
pub fn build(self) -> GameResult<Context>
Build the Context.
Trait Implementations
impl Debug for ContextBuilder
[src]
impl Debug for ContextBuilder
Auto Trait Implementations
impl Send for ContextBuilder
impl Send for ContextBuilder
impl Sync for ContextBuilder
impl Sync for ContextBuilder