Struct rust_animation::actor::Actor
source · pub struct Actor {Show 19 fields
pub name: String,
pub x: i32,
pub y: i32,
pub z: f32,
pub width: u32,
pub height: u32,
pub anchor_x: f32,
pub anchor_y: f32,
pub scale_x: f32,
pub scale_y: f32,
pub rotation: i32,
pub visible: bool,
pub image_path: String,
pub sub_actor_list: Vec<Actor>,
pub animated: bool,
pub animation: Option<Animation>,
pub needs_update: bool,
pub node: Option<Node>,
pub style: Option<Style>,
/* private fields */
}
Fields§
§name: String
§x: i32
§y: i32
§z: f32
§width: u32
§height: u32
§anchor_x: f32
§anchor_y: f32
§scale_x: f32
§scale_y: f32
§rotation: i32
§visible: bool
§image_path: String
§sub_actor_list: Vec<Actor>
§animated: bool
§animation: Option<Animation>
§needs_update: bool
§node: Option<Node>
§style: Option<Style>
Implementations§
source§impl Actor
impl Actor
pub fn new( name: String, w: u32, h: u32, event_handler: Option<Box<dyn EventHandler>> ) -> Self
pub fn init_gl(&mut self)
pub fn set_color(&mut self, r: f32, g: f32, b: f32)
pub fn set_image(&mut self, path: String)
pub fn set_layout(&mut self, layout: Option<Box<dyn Layout>>)
pub fn set_animation(&mut self, animation: Option<Animation>)
pub fn set_style(&mut self, style: Style)
pub fn set_visible(&mut self, visible: bool)
pub fn animate(&mut self)
pub fn select_next_sub_actor(&mut self)
pub fn select_prev_sub_actor(&mut self)
pub fn set_focus(&mut self, focused: bool)
pub fn handle_input(&mut self, key: Key)
pub fn layout_sub_actors( &mut self, parent_actor: Option<&Actor>, stretch: &mut Option<Stretch> )
pub fn update_layout(&mut self, stretch: &mut Option<Stretch>)
pub fn finalize_layout(&mut self)
pub fn model_matrix(&self) -> Matrix4<f32>
pub fn render( &mut self, shader_program: GLuint, parent_model_matrix: Option<&Matrix4<f32>>, projection: &Matrix4<f32> )
pub fn add_sub_actor(&mut self, actor: Actor)
Auto Trait Implementations§
impl !RefUnwindSafe for Actor
impl !Send for Actor
impl !Sync for Actor
impl Unpin for Actor
impl !UnwindSafe for Actor
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