Feat: early mouse support
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user