uzor 1.2.1

Core UI engine — geometry, interaction, input state
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Radio persistent state.

/// Persistent state for a radio group widget.
#[derive(Debug, Default, Clone)]
pub struct RadioState {
    /// Index of the currently selected option.
    pub selected_idx: usize,
}

impl RadioState {
    /// Select a specific index.
    pub fn select(&mut self, idx: usize) {
        self.selected_idx = idx;
    }
}