Menu

Struct Menu 

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

Implementations§

Source§

impl Menu

Source

pub fn get_handle(&self) -> *const c_void

Source

pub fn new(handle: *const c_void) -> Menu

Source

pub fn create( title: &str, columns: u32, position: Vector2, column1_widthh: f32, column2_width: f32, ) -> Option<Menu>

Creates a menu

Source

pub fn destroy(&self) -> bool

Destroys a menu

Source

pub fn add_item(&self, column: u8, text: &str) -> i32

Add item to menu

Source

pub fn set_column_header(&self, column: u8, header_title: &str) -> bool

Sets the caption of a column in a menu.

Source

pub fn show_for_player(&self, player: &Player) -> bool

Shows the menu to a player

Source

pub fn hide_for_player(&self, player: &Player) -> bool

Hides the menu from a player

Source

pub fn disable(&self) -> bool

Disable a menu, same as destroying it

Source

pub fn disable_row(&self, row: u8) -> bool

Disable a particular row in menu

Source

pub fn is_disabled(&self) -> bool

Checks if a menu disabled or not

Source

pub fn is_row_disabled(&self, row: i32) -> bool

Checks if a row in menu is disabled or not

Source

pub fn get_columns(&self) -> i32

Get the number of active columns.

Source

pub fn get_items(&self, column: i32) -> i32

Get the number of rows in the given column.

Source

pub fn get_pos(&self) -> Vector2

Get position of the menu

Source

pub fn get_column_width(&self) -> (f32, f32)

Get the column width of menu

Source

pub fn get_column_header(&self, column: i32) -> String

Get caption of the menu

Source

pub fn get_item(&self, column: i32, row: i32) -> String

Get an item at particular row and column in menu

Source

pub fn get_id(&self) -> i32

Get the id of the menu object

Source

pub fn from_id(id: i32) -> Option<Menu>

Get menu instance from id

Auto Trait Implementations§

§

impl Freeze for Menu

§

impl RefUnwindSafe for Menu

§

impl !Send for Menu

§

impl !Sync for Menu

§

impl Unpin for Menu

§

impl UnwindSafe for Menu

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.