[−][src]Struct ggez::ContextBuilder
A builder object for creating a Context
.
Implementations
impl ContextBuilder
[src]
pub fn new(game_id: &str, author: &str) -> Self
[src]
Create a new ContextBuilder
with default settings.
pub fn window_setup(mut self: Self, setup: WindowSetup) -> Self
[src]
Sets the window setup settings.
pub fn window_mode(mut self: Self, mode: WindowMode) -> Self
[src]
Sets the window mode settings.
pub fn backend(mut self: Self, backend: Backend) -> Self
[src]
Sets the graphics backend.
pub fn modules(mut self: Self, modules: ModuleConf) -> Self
[src]
Sets the modules configuration.
pub fn default_conf(mut self: Self, conf: Conf) -> Self
[src]
Sets all the config options, overriding any previous
ones from window_setup()
,
window_mode()
, and
backend()
. These are used as
defaults and are overridden by any external config
file found.
pub fn add_resource_path<T>(mut self: 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 add_zipfile_bytes<B>(mut self: Self, bytes: B) -> Self where
B: Into<Cow<'static, [u8]>>,
[src]
B: Into<Cow<'static, [u8]>>,
Add a new zip file from bytes whose contents will be searched
for resources. The zip file will be stored in-memory.
You can pass it a static slice, a Vec
of bytes, etc.
use ggez::context::ContextBuilder; let _ = ContextBuilder::new() .add_zipfile_bytes(include_bytes!("../resources.zip").to_vec()) .build();
pub fn with_conf_file(mut self: 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, EventLoop<()>)>
[src]
Build the Context
.
Trait Implementations
impl Clone for ContextBuilder
[src]
pub fn clone(&self) -> ContextBuilder
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ContextBuilder
[src]
impl PartialEq<ContextBuilder> for ContextBuilder
[src]
pub fn eq(&self, other: &ContextBuilder) -> bool
[src]
pub fn ne(&self, other: &ContextBuilder) -> bool
[src]
impl StructuralPartialEq for ContextBuilder
[src]
Auto Trait Implementations
impl RefUnwindSafe for ContextBuilder
[src]
impl Send for ContextBuilder
[src]
impl Sync for ContextBuilder
[src]
impl Unpin for ContextBuilder
[src]
impl UnwindSafe for ContextBuilder
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,