Struct ggez::ContextBuilder
[−]
[src]
pub struct ContextBuilder { /* fields omitted */ }
WindowMode should probably include title and icon...
except those hardly ever have to be reset, just set at init time, so putting those in WindowSetup is reasonable. We currently don't offer a way to alter them anyway. Though it shouldn't be hard to add?
We should also have a way to retrieve the current WindowMode, to make it easier to alter rather than overwrite settings?
We also need to think harder about how the conf file interacts with this. Currently it overwrites everything but that jibes poorly with this sort of incremental stuffs. Hmmm.
Maybe you set up the ContextBuilder, then when you call build() then IF a conf file it exists it overwrites its settings? That's similar to how it works now, but allows you the opportunity to fiddle with paths and such before hand. That's probably the best option.
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.