Player

Struct Player 

Source
pub struct Player { /* private fields */ }

Implementations§

Source§

impl Player

Source

pub fn new( beatmap: Beatmap, column_width: f32, note_size: f32, height: f32, ) -> Option<Self>

Source

pub fn set_note_style(&mut self, style: NoteStyle)

Source

pub fn get_required_size(&self) -> [f32; 2]

Source

pub fn set_speed(&mut self, speed: f64)

Source

pub fn set_scroll_time(&mut self, ms: f32)

Source

pub fn render(&mut self, ui: &mut Ui)

Source

pub fn render_at(&mut self, ui: &mut Ui, position: Pos2)

Source

pub fn reset_time(&mut self)

Source

pub fn set_current_time(&mut self, time_ms: f64)

Source

pub fn current_time(&self) -> f64

Auto Trait Implementations§

§

impl Freeze for Player

§

impl RefUnwindSafe for Player

§

impl Send for Player

§

impl Sync for Player

§

impl Unpin for Player

§

impl UnwindSafe for Player

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.