ratatui_toolkit/primitives/button/methods/update_hover.rs
1use crate::primitives::button::Button;
2
3impl Button {
4 /// Updates the button's hover state based on cursor position.
5 ///
6 /// # Arguments
7 ///
8 /// * `column` - The column (x) coordinate of the cursor
9 /// * `row` - The row (y) coordinate of the cursor
10 pub fn update_hover(&mut self, column: u16, row: u16) {
11 self.hovered = self.is_clicked(column, row);
12 }
13}