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]
pub fn new(game_id: &'static str, author: &'static str) -> Self
[src]
Create a new ContextBuilder
pub fn window_setup(self, setup: WindowSetup) -> Self
[src]
Sets the window setup settings
pub fn window_mode(self, mode: WindowMode) -> Self
[src]
Sets the window mode settings
pub fn backend(self, backend: Backend) -> Self
[src]
Sets the graphics backend
pub 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.
pub 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.
pub fn build(self) -> GameResult<Context>
[src]
Build the Context.