Feat: early mouse support

This commit is contained in:
2026-02-14 16:26:29 +01:00
parent 5e7fd8b79c
commit cfaadd9d33
23 changed files with 1256 additions and 285 deletions

View File

@@ -8,6 +8,12 @@ pub fn toggle_focus(ui: &mut UiState) {
};
}
pub fn select_category(ui: &mut UiState, index: usize) {
if index < categories::category_count() {
ui.dict_category = index;
}
}
pub fn next_category(ui: &mut UiState) {
let count = categories::category_count();
ui.dict_category = (ui.dict_category + 1) % count;

View File

@@ -8,6 +8,12 @@ pub fn toggle_focus(ui: &mut UiState) {
};
}
pub fn select_topic(ui: &mut UiState, index: usize) {
if index < docs::topic_count() {
ui.help_topic = index;
}
}
pub fn next_topic(ui: &mut UiState, n: usize) {
let count = docs::topic_count();
ui.help_topic = (ui.help_topic + n) % count;