cargo fmt
This commit is contained in:
@@ -19,7 +19,13 @@ pub fn widgets_ontop<R>(
|
||||
|
||||
/// A toggle button that XORs its state when clicked.
|
||||
/// Shows different hover text based on current state.
|
||||
pub fn toggle_button(ui: &mut Ui, state: &mut bool, label: &str, enabled_tip: &str, disabled_tip: &str) {
|
||||
pub fn toggle_button(
|
||||
ui: &mut Ui,
|
||||
state: &mut bool,
|
||||
label: &str,
|
||||
enabled_tip: &str,
|
||||
disabled_tip: &str,
|
||||
) {
|
||||
state.bitxor_assign(
|
||||
ui.add(Button::new(label))
|
||||
.on_hover_text(if *state { enabled_tip } else { disabled_tip })
|
||||
|
||||
Reference in New Issue
Block a user