Module ui

Source
Expand description

The UI module is a collection of functions and structs that allow you to create a user interface.

§Examples

which are also unit tests:

Ui Ui color_scheme Ui button Ui button_img Ui button_round Ui handle Ui handle_begin Ui hseparator Ui hslider Ui vslider Ui slider_behavior Ui image Ui input Ui label Ui layout_area Ui layout_push Ui model Ui panel_at Ui panel_begin Ui progress_bar_at Ui push_surface Ui push_text_style Ui push_tint Ui gen_quadrant_mesh Ui radio button Ui toggle Ui draw_element Ui set_theme_color Ui text Ui window

Structs§

Ui
This class is a collection of user interface and interaction methods! StereoKit uses an Immediate Mode GUI system, which can be very easy to work with and modify during runtime.
UiCorner
For elements that contain corners, this bit flag allows you to specify which corners. https://stereokit.net/Pages/StereoKit/UICorner.html
UiLathePt
A point on a lathe for a mesh generation algorithm. This is the ‘silhouette’ of the mesh, or the shape the mesh would take if you spun this line of points in a cylinder. https://stereokit.net/Pages/StereoKit/UILathePt.html
UiScroll
This describes how UI elements with scrollable regions scroll around or use scroll bars! This allows you to enable or disable vertical and horizontal scrolling. https://stereokit.net/Pages/StereoKit/UIScroll.html
UiSettings
Visual properties and spacing of the UI system. https://stereokit.net/Pages/StereoKit/UISettings.html
UiSliderData
Visual properties of a slider behavior. https://stereokit.net/Pages/StereoKit/UISliderData.html

Enums§

UiBtnLayout
Describes the layout of a button with image/text contents! You can think of the naming here as being the location of the image, with the text filling the remaining space. https://stereokit.net/Pages/StereoKit/UIBtnLayout.html
UiColor
Theme color categories to pair with Ui::set_theme_color. The total lenght is [u32,u32] where the fist u32 is the enum and the second is the ExtraSlot value native C function should convert this to UiColorT https://stereokit.net/Pages/StereoKit/UIColor.html
UiColorState
Indicates the state of a UI theme color. https://stereokit.net/Pages/StereoKit/UIColorState.html
UiConfirm
Used with StereoKit’s UI, and determines the interaction confirmation behavior for certain elements, such as the Ui::hslider! https://stereokit.net/Pages/StereoKit/UIConfirm.html
UiCut
This describes how a layout should be cut up! Used with Ui::layout_push_cut. https://stereokit.net/Pages/StereoKit/UICut.html
UiDir
For UI elements that can be oriented horizontally or vertically, this specifies that orientation. https://stereokit.net/Pages/StereoKit/UIDir.html
UiGesture
This is a bit flag that describes different types and combinations of gestures used within the UI system. https://stereokit.net/Pages/StereoKit/UIGesture.html
UiMove
This describes how a UI element moves when being dragged around by a user! https://stereokit.net/Pages/StereoKit/UIMove.html
UiNotify
Determines when this UI function returns true. https://stereokit.net/Pages/StereoKit/UINotify.html
UiPad
https://stereokit.net/Pages/StereoKit/UIPad.html
UiVisual
Used with StereoKit’s UI to indicate a particular type of UI element visual. https://stereokit.net/Pages/StereoKit/UIVisual.html
UiWin
A description of what type of window to draw! This is a bit flag, so it can contain multiple elements. https://stereokit.net/Pages/StereoKit/UIWin.html

Functions§

ui_button
ui_button_16
ui_button_at
ui_button_at_16
ui_button_behavior
ui_button_behavior_depth
ui_button_img
ui_button_img_16
ui_button_img_at
ui_button_img_at_16
ui_button_img_sz
ui_button_img_sz_16
ui_button_round
ui_button_round_16
ui_button_round_at
ui_button_round_at_16
ui_button_sz
ui_button_sz_16
ui_draw_element
ui_draw_element_color
ui_enable_far_interact
ui_far_interact_enabled
ui_gen_quadrant_mesh
ui_get_anim_focus
ui_get_element_color
ui_get_gutter
ui_get_margin
ui_get_padding
ui_get_settings
ui_get_text_style
ui_get_theme_color
ui_get_theme_color_state
ui_grab_aura_enabled
ui_handle_begin
ui_handle_begin_16
ui_handle_end
ui_has_keyboard_focus
ui_hprogress_bar
ui_hseparator
ui_hslider
ui_hslider_16
ui_hslider_at
ui_hslider_at_16
ui_hslider_at_f64
ui_hslider_at_f64_16
ui_hslider_f64
ui_hslider_f64_16
ui_hspace
ui_image
ui_input
ui_input_16
ui_input_at
ui_input_at_16
ui_is_enabled
ui_is_interacting
TODO: v0.4 These functions use hands instead of interactors, they need replaced!
ui_label
ui_label_16
ui_label_sz
ui_label_sz_16
ui_last_element_active
ui_last_element_focused
ui_last_element_hand_active
TODO: v0.4 These functions use hands instead of interactors, they need replaced!
ui_last_element_hand_focused
TODO: v0.4 These functions use hands instead of interactors, they need replaced!
ui_layout_area
ui_layout_at
ui_layout_last
ui_layout_pop
ui_layout_push
ui_layout_push_cut
ui_layout_remaining
ui_layout_reserve
ui_line_height
ui_model
ui_model_at
ui_nextline
ui_panel_at
ui_panel_begin
ui_panel_end
ui_play_sound_off
ui_play_sound_on
ui_play_sound_on_off
ui_pop_enabled
ui_pop_grab_aura
ui_pop_id
ui_pop_preserve_keyboard
ui_pop_surface
ui_pop_text_style
ui_pop_tint
ui_popup_pose
ui_progress_bar_at
ui_push_enabled
ui_push_grab_aura
ui_push_id
ui_push_id_16
ui_push_idi
ui_push_preserve_keyboard
ui_push_surface
ui_push_text_style
ui_push_tint
ui_quadrant_size_mesh
ui_quadrant_size_verts
ui_sameline
ui_set_color
ui_set_element_color
ui_set_element_sound
ui_set_element_visual
ui_set_theme_color
ui_set_theme_color_state
ui_settings
ui_show_volumes
ui_slider_behavior
ui_stack_hash
ui_stack_hash_16
ui_system_get_move_type
ui_system_set_move_type
ui_text
ui_text_16
ui_text_at
ui_text_at_16
ui_text_sz
ui_text_sz_16
ui_toggle
ui_toggle_16
ui_toggle_at
ui_toggle_at_16
ui_toggle_img
ui_toggle_img_16
ui_toggle_img_at
ui_toggle_img_at_16
ui_toggle_img_sz
ui_toggle_img_sz_16
ui_toggle_sz
ui_toggle_sz_16
ui_volume_at
ui_volume_at_16
ui_vprogress_bar
ui_vslider
ui_vslider_16
ui_vslider_at
ui_vslider_at_16
ui_vslider_at_f64
ui_vslider_at_f64_16
ui_vslider_f64
ui_vslider_f64_16
ui_vspace
ui_window_begin
ui_window_begin_16
ui_window_end

Type Aliases§

IdHashT
StereoKit ffi type. see also crate::util::Hash Ui::stack_hash Ui::push_id Ui::push_id_int