Struct conrod::Button
[−]
[src]
pub struct Button<'a, F> { // some fields omitted }
A pressable button widget whose reaction is triggered upon release.
Methods
impl<'a, F> Button<'a, F>
fn new() -> Button<'a, F>
Create a button context to be built upon.
fn react(self, reaction: F) -> Button<'a, F>
Set the reaction for the Button. The reaction will be triggered upon release of the button.
fn set<C>(self, ui_id: UiId, ui: &mut Ui<C>) where C: CharacterCache, F: FnMut()
After building the Button, use this method to set its current state into the given Ui
.
It will use this state for rendering the next time ui.draw(graphics)
is called.