Module pix_engine::gui::widgets
source · Expand description
UI widget rendering methods.
Provided PixState
methods:
Example
fn on_update(&mut self, s: &mut PixState) -> PixResult<()> {
if s.button("Button")? {
// was clicked
}
s.checkbox("Checkbox", &mut self.checkbox)?;
s.radio("Radio 1", &mut self.radio, 0)?;
s.radio("Radio 2", &mut self.radio, 1)?;
s.radio("Radio 3", &mut self.radio, 2)?;
Ok(())
}
Modules
- Input field widget rendering methods.
- Select widget rendering methods.
- Slider and drag widget rendering methods.
- Text widget rendering methods.
- Tooltip widget rendering methods.