ratatui-toolkit 0.2.6

DEPRECATED: this crate was renamed to `ratkit`. Please migrate to `ratkit`.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::primitives::button::Button;

impl Button {
    /// Updates the button's hover state based on cursor position.
    ///
    /// # Arguments
    ///
    /// * `column` - The column (x) coordinate of the cursor
    /// * `row` - The row (y) coordinate of the cursor
    ///
    /// # Returns
    ///
    /// Nothing (updates internal hover state)
    pub fn update_hover(&mut self, column: u16, row: u16) {
        self.hovered = self.is_clicked(column, row);
    }
}