Struct ggez::Context
[−]
[src]
pub struct Context<'a> { pub sdl_context: Sdl, pub ttf_context: Sdl2TtfContext, pub mixer_context: Sdl2MixerContext, pub renderer: Renderer<'a>, pub filesystem: Filesystem, pub gfx_context: GraphicsContext, pub event_context: EventSubsystem, pub timer_context: TimeContext, // some fields omitted }
A Context
holds all the state needed to interface
with the hardware. Only one Context
can exist at a
time.
Fields
sdl_context: Sdl
ttf_context: Sdl2TtfContext
mixer_context: Sdl2MixerContext
renderer: Renderer<'a>
filesystem: Filesystem
gfx_context: GraphicsContext
event_context: EventSubsystem
timer_context: TimeContext
Methods
impl<'a> Context<'a>
[src]
fn from_conf(conf: &Conf, fs: Filesystem, sdl_context: Sdl) -> GameResult<Context<'a>>
Tries to create a new Context using settings from the given config file.
fn print_sound_stats(&self)
Prints out information on the sound subsystem.
fn print_resource_stats(&mut self)
Prints out information on the resources subsystem.
fn quit(&mut self) -> GameResult<()>
Triggers a Quit event. BUGGO: This actually doesn't work 'cause we can't push non-user event types for some reason! See https://github.com/AngryLawyer/rust-sdl2/issues/530 :-(