Module ui

Source
Expand description

Immediate mode UI.

Spiritual successor of megaui library, but fully skinnable and configurable.

The UI entrypoint is root_ui() call.

root_ui().label(None, "hello megaui");
if root_ui().button(None, "Push me") {
   println!("pushed");
}

This will draw a label and a button one after each other right on top of the screen.

Re-exports§

pub use render::Vertex;

Modules§

canvas
In-window drawing canvas for custom primitives like lines, rect and textures
widgets

Structs§

DrawList
Skin
Style
StyleBuilder
Ui

Enums§

Drag
DragState
KeyCode
Layout
UiContent

Traits§

ClipboardObject
InputHandler

Functions§

root_ui
Root UI. Widgets drawn with the root ui will be always presented at the end of the frame with a “default” camera. UI space would be a “default” screen space (0..screen_width(), 0..screen_height())

Type Aliases§

Id
Is used to keep track of internal state of various widgets like widgets::Window These should be unique per window and ideally not change in between frames.