pub struct Nes { /* private fields */ }
Expand description
Represents all the NES Emulation state.
Implementations§
Trait Implementations§
source§impl PixEngine for Nes
impl PixEngine for Nes
source§fn on_start(&mut self, s: &mut PixState) -> PixResult<()>
fn on_start(&mut self, s: &mut PixState) -> PixResult<()>
Called once upon engine start when
Engine::run
is called. Read moresource§fn on_stop(&mut self, s: &mut PixState) -> PixResult<()>
fn on_stop(&mut self, s: &mut PixState) -> PixResult<()>
Called when the engine detects a close/exit event such as calling
PixState::quit
or if an
error is returned during program execution by any PixEngine
methods. Read moresource§fn on_mouse_pressed(
&mut self,
s: &mut PixState,
btn: Mouse,
_pos: Point<i32>
) -> PixResult<bool>
fn on_mouse_pressed( &mut self, s: &mut PixState, btn: Mouse, _pos: Point<i32> ) -> PixResult<bool>
source§fn on_mouse_motion(
&mut self,
_s: &mut PixState,
pos: Point<i32>,
_rel_pos: Point<i32>
) -> PixResult<bool>
fn on_mouse_motion( &mut self, _s: &mut PixState, pos: Point<i32>, _rel_pos: Point<i32> ) -> PixResult<bool>
source§fn on_controller_update(
&mut self,
_s: &mut PixState,
controller_id: ControllerId,
update: ControllerUpdate
) -> PixResult<bool>
fn on_controller_update( &mut self, _s: &mut PixState, controller_id: ControllerId, update: ControllerUpdate ) -> PixResult<bool>
Called each time a
Controller
is added, removed, or remapped. Read moresource§fn on_controller_pressed(
&mut self,
s: &mut PixState,
event: ControllerEvent
) -> PixResult<bool>
fn on_controller_pressed( &mut self, s: &mut PixState, event: ControllerEvent ) -> PixResult<bool>
Called each time a
ControllerButton
is pressed with the ControllerEvent
indicating
which button is pressed. Read moresource§fn on_controller_released(
&mut self,
s: &mut PixState,
event: ControllerEvent
) -> PixResult<bool>
fn on_controller_released( &mut self, s: &mut PixState, event: ControllerEvent ) -> PixResult<bool>
Called each time a
ControllerButton
is pressed with the ControllerEvent
indicating
which key and modifiers are released. Read moresource§fn on_controller_axis_motion(
&mut self,
s: &mut PixState,
controller_id: ControllerId,
axis: Axis,
value: i32
) -> PixResult<bool>
fn on_controller_axis_motion( &mut self, s: &mut PixState, controller_id: ControllerId, axis: Axis, value: i32 ) -> PixResult<bool>
source§fn on_window_event(
&mut self,
s: &mut PixState,
window_id: WindowId,
event: WindowEvent
) -> PixResult<()>
fn on_window_event( &mut self, s: &mut PixState, window_id: WindowId, event: WindowEvent ) -> PixResult<()>
Called each time a window event occurs. Read more
source§fn on_key_typed(&mut self, s: &mut PixState, text: &str) -> Result<bool, Error>
fn on_key_typed(&mut self, s: &mut PixState, text: &str) -> Result<bool, Error>
Called each time text input is received. Read more
source§fn on_mouse_dragged(
&mut self,
s: &mut PixState,
pos: Point,
rel_pos: Point
) -> Result<bool, Error>
fn on_mouse_dragged( &mut self, s: &mut PixState, pos: Point, rel_pos: Point ) -> Result<bool, Error>
source§fn on_mouse_released(
&mut self,
s: &mut PixState,
btn: Mouse,
pos: Point
) -> Result<bool, Error>
fn on_mouse_released( &mut self, s: &mut PixState, btn: Mouse, pos: Point ) -> Result<bool, Error>
source§fn on_mouse_clicked(
&mut self,
s: &mut PixState,
btn: Mouse,
pos: Point
) -> Result<bool, Error>
fn on_mouse_clicked( &mut self, s: &mut PixState, btn: Mouse, pos: Point ) -> Result<bool, Error>
source§fn on_mouse_dbl_clicked(
&mut self,
s: &mut PixState,
btn: Mouse,
pos: Point
) -> Result<bool, Error>
fn on_mouse_dbl_clicked( &mut self, s: &mut PixState, btn: Mouse, pos: Point ) -> Result<bool, Error>
Auto Trait Implementations§
impl RefUnwindSafe for Nes
impl !Send for Nes
impl !Sync for Nes
impl Unpin for Nes
impl UnwindSafe for Nes
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more