Function button_with_options

Source
pub fn button_with_options(
    rect: Rect,
    text: &str,
    options: ButtonOptions,
) -> bool
Expand description

Legacy click-on-press button with an explicit disabled state. Disabled buttons use muted text, ignore hover/selection, and never activate. Enabled buttons keep button’s hit rectangle and appearance. This helper does not own keyboard focus or pointer capture; use Ui for those menus.

use ferravex_render::{Rect, ui::{ButtonOptions, button_with_options}};
let options = ButtonOptions { enabled: false, selected: true };
assert!(!button_with_options(Rect::new(20., 20., 100., 40.), "LOCKED", options));