Trait raylib::rgui::RaylibDrawGui[][src]

pub trait RaylibDrawGui {
Show 46 methods fn gui_enable(&mut self) { ... }
fn gui_disable(&mut self) { ... }
fn gui_lock(&mut self) { ... }
fn gui_unlock(&mut self) { ... }
fn gui_fade(&mut self, alpha: f32) { ... }
fn gui_set_state(&mut self, state: GuiControlState) { ... }
fn gui_get_state(&mut self) -> GuiControlState { ... }
fn gui_set_font(&mut self, font: impl AsRef<Font>) { ... }
fn gui_get_font(&mut self) -> WeakFont { ... }
fn gui_set_style(&mut self, control: GuiControl, property: i32, value: i32) { ... }
fn gui_get_style(&self, control: GuiControl, property: i32) -> i32 { ... }
fn gui_load_style(&mut self, filename: Option<&CStr>) { ... }
fn gui_load_style_default(&mut self) { ... }
fn gui_window_box(
        &mut self,
        bounds: impl Into<Rectangle>,
        title: Option<&CStr>
    ) -> bool { ... }
fn gui_group_box(
        &mut self,
        bounds: impl Into<Rectangle>,
        text: Option<&CStr>
    ) { ... }
fn gui_line(&mut self, bounds: impl Into<Rectangle>, text: Option<&CStr>) { ... }
fn gui_panel(&mut self, bounds: impl Into<Rectangle>) { ... }
fn gui_scroll_panel(
        &mut self,
        bounds: impl Into<Rectangle>,
        content: impl Into<Rectangle>,
        scroll: impl Into<Vector2>
    ) -> (Rectangle, Vector2) { ... }
fn gui_label(&mut self, bounds: impl Into<Rectangle>, text: Option<&CStr>) { ... }
fn gui_button(
        &mut self,
        bounds: impl Into<Rectangle>,
        text: Option<&CStr>
    ) -> bool { ... }
fn gui_label_button(
        &mut self,
        bounds: impl Into<Rectangle>,
        text: Option<&CStr>
    ) -> bool { ... }
fn gui_image_button(
        &mut self,
        bounds: impl Into<Rectangle>,
        text: Option<&CStr>,
        texture: impl AsRef<Texture>
    ) -> bool { ... }
fn gui_image_button_ex(
        &mut self,
        bounds: impl Into<Rectangle>,
        text: Option<&CStr>,
        texture: impl AsRef<Texture>,
        tex_source: impl Into<Rectangle>
    ) -> bool { ... }
fn gui_toggle(
        &mut self,
        bounds: impl Into<Rectangle>,
        text: Option<&CStr>,
        active: bool
    ) -> bool { ... }
fn gui_toggle_group(
        &mut self,
        bounds: impl Into<Rectangle>,
        text: Option<&CStr>,
        active: i32
    ) -> i32 { ... }
fn gui_check_box(
        &mut self,
        bounds: impl Into<Rectangle>,
        text: Option<&CStr>,
        checked: bool
    ) -> bool { ... }
fn gui_combo_box(
        &mut self,
        bounds: impl Into<Rectangle>,
        text: Option<&CStr>,
        active: i32
    ) -> i32 { ... }
fn gui_dropdown_box(
        &mut self,
        bounds: impl Into<Rectangle>,
        text: Option<&CStr>,
        active: &mut i32,
        edit_mode: bool
    ) -> bool { ... }
fn gui_spinner(
        &mut self,
        bounds: impl Into<Rectangle>,
        text: Option<&CStr>,
        value: &mut i32,
        min_value: i32,
        max_value: i32,
        edit_mode: bool
    ) -> bool { ... }
fn gui_value_box(
        &mut self,
        bounds: impl Into<Rectangle>,
        text: Option<&CStr>,
        value: &mut i32,
        min_value: i32,
        max_value: i32,
        edit_mode: bool
    ) -> bool { ... }
fn gui_text_box(
        &mut self,
        bounds: impl Into<Rectangle>,
        buffer: &mut [u8],
        edit_mode: bool
    ) -> bool { ... }
fn gui_text_box_multi(
        &mut self,
        bounds: impl Into<Rectangle>,
        buffer: &mut [u8],
        edit_mode: bool
    ) -> bool { ... }
fn gui_slider(
        &mut self,
        bounds: impl Into<Rectangle>,
        text_left: Option<&CStr>,
        text_right: Option<&CStr>,
        value: f32,
        min_value: f32,
        max_value: f32
    ) -> f32 { ... }
fn gui_slider_bar(
        &mut self,
        bounds: impl Into<Rectangle>,
        text_left: Option<&CStr>,
        text_right: Option<&CStr>,
        value: f32,
        min_value: f32,
        max_value: f32
    ) -> f32 { ... }
fn gui_progress_bar(
        &mut self,
        bounds: impl Into<Rectangle>,
        text_left: Option<&CStr>,
        text_right: Option<&CStr>,
        value: f32,
        min_value: f32,
        max_value: f32
    ) -> f32 { ... }
fn gui_status_bar(
        &mut self,
        bounds: impl Into<Rectangle>,
        text: Option<&CStr>
    ) { ... }
fn gui_dummy_rec(
        &mut self,
        bounds: impl Into<Rectangle>,
        text: Option<&CStr>
    ) { ... }
fn gui_scroll_bar(
        &mut self,
        bounds: impl Into<Rectangle>,
        value: i32,
        min_value: i32,
        max_value: i32
    ) -> i32 { ... }
fn gui_grid(
        &mut self,
        bounds: impl Into<Rectangle>,
        spacing: f32,
        subdivs: i32
    ) -> Vector2 { ... }
fn gui_list_view(
        &mut self,
        bounds: impl Into<Rectangle>,
        text: Option<&CStr>,
        scroll_index: &mut i32,
        active: i32
    ) -> i32 { ... }
fn gui_list_view_ex(
        &mut self,
        bounds: impl Into<Rectangle>,
        text: &[&CStr],
        focus: &mut i32,
        scroll_index: &mut i32,
        active: i32
    ) -> i32 { ... }
fn gui_message_box(
        &mut self,
        bounds: impl Into<Rectangle>,
        text: Option<&CStr>,
        message: Option<&CStr>,
        buttons: Option<&CStr>
    ) -> i32 { ... }
fn gui_text_input_box(
        &mut self,
        bounds: impl Into<Rectangle>,
        title: Option<&CStr>,
        message: Option<&CStr>,
        buttons: Option<&CStr>,
        text: &mut Vec<u8>
    ) -> i32 { ... }
fn gui_color_picker(
        &mut self,
        bounds: impl Into<Rectangle>,
        color: impl Into<Color>
    ) -> Color { ... }
fn gui_icon_text(
        &mut self,
        icon_id: guiIconName,
        text: Option<&CStr>
    ) -> String { ... }
fn gui_color_bar_alpha(
        &mut self,
        bounds: impl Into<Rectangle>,
        alpha: f32
    ) -> f32 { ... }
}

Provided methods

Enable gui controls (global state)

Disable gui controls (global state)

Lock gui controls (global state)

Unlock gui controls (global state)

Set gui state (global state)

Get gui state (global state)

Set gui custom font (global state)

Get gui custom font (global state)

Set one style property SHOULD use one of the Gui*Property enums

Get one style property SHOULD use one of the Gui*Property enums

Load style file (.rgs)

Load style default over global style

Window Box control, shows a window that can be closed

Group Box control with text name

Line separator control, could contain text

Panel control, useful to group controls

Scroll Panel control

Label control, shows text

Button control, returns true when clicked

Label button control, show true when clicked

Image button control, returns true when clicked

Image button extended control, returns true when clicked

Toggle Button control, returns true when active

Toggle Group control, returns active toggle index

Check Box control, returns true when active

Combo Box control, returns selected item index

Dropdown Box control, returns selected item

Spinner control, returns selected value

Value Box control, updates input text with numbers

Text Box control, updates input text Use at your own risk!!! The allocated vector MUST have enough space for edits.

Text Box control with multiple lines Use at your own risk!!! The allocated vector MUST have a nul terminator.

Slider control, returns selected value

Slider Bar control, returns selected value

Progress Bar control, shows current progress value

Status Bar control, shows info text

Dummy control for placeholders

Scroll Bar control

Grid control

List View control, returns selected list item index

List View with extended parameters

Message Box control, displays a message

Text Input Box control, ask for text

Color Picker control

Color Bar Alpha control NOTE: Returns alpha value normalized [0..1]

Implementors