Tweaked the key mappings so that it is now easier to change key mappings and update the corresponding UI elements as well

This commit is contained in:
2023-08-08 10:50:07 -06:00
parent 74011b9ab3
commit 5602fc4341
16 changed files with 469 additions and 206 deletions
+7 -7
View File
@@ -284,12 +284,12 @@ impl HorizontallyScrollableText {
}
}
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
#[derive(Clone, PartialEq, Eq, Debug)]
pub struct TabRoute {
pub title: &'static str,
pub route: Route,
pub help: &'static str,
pub contextual_help: Option<&'static str>,
pub help: String,
pub contextual_help: Option<String>,
}
pub struct TabState {
@@ -313,12 +313,12 @@ impl TabState {
&self.tabs[self.index].route
}
pub fn get_active_tab_help(&self) -> &'static str {
self.tabs[self.index].help
pub fn get_active_tab_help(&self) -> &str {
&self.tabs[self.index].help
}
pub fn get_active_tab_contextual_help(&self) -> Option<&'static str> {
self.tabs[self.index].contextual_help
pub fn get_active_tab_contextual_help(&self) -> Option<String> {
self.tabs[self.index].contextual_help.clone()
}
pub fn next(&mut self) {