Struct direct_gui::controls::Sprite
[−]
[src]
pub struct Sprite {
pub sprite_ref: SpriteRef,
// some fields omitted
}The skin of the button is a sprite.
Fields
sprite_ref: SpriteRef
Methods
impl Sprite[src]
pub fn new_with_sprite(sprite_ref: SpriteRef) -> Self[src]
pub fn pos(&self) -> (i32, i32)[src]
Retrieve the position.
pub fn with_pos(self, x: i32, y: i32) -> Self[src]
Map a position.
pub fn set_pos(&mut self, x: i32, y: i32)[src]
Change the position.
Trait Implementations
impl Debug for Sprite[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl Control for Sprite[src]
fn update(&mut self, _args: &ControlState, _res: &Resources)[src]
Update the control.
fn draw(&self, buffer: &mut Vec<u32>, buffer_width: usize, res: &Resources)[src]
Draw the control on the output buffer.
fn as_any(&self) -> &Any[src]
For downcasting.
fn control_type(&self) -> ControlType[src]
Retrieve what type of control this is.
fn as_any_mut(&mut self) -> &mut Any[src]
For downcasting.