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]
fn new(game_id: &'static str, author: &'static str) -> Self
[src]
Create a new ContextBuilder
fn window_setup(self, setup: WindowSetup) -> Self
[src]
Sets the window setup settings
fn window_mode(self, mode: WindowMode) -> Self
[src]
Sets the window mode settings
fn backend(self, backend: Backend) -> Self
[src]
Sets the graphics backend
fn add_resource_path<T>(self, path: T) -> Self where
T: Into<PathBuf>,
[src]
T: Into<PathBuf>,
Add a new read-only filesystem path to the places to search for resources.
fn with_conf_file(self, load_conf_file: bool) -> Self
[src]
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.
fn build(self) -> GameResult<Context>
[src]
Build the Context.