30 lines
1.0 KiB
Rust
30 lines
1.0 KiB
Rust
use crate::ui::pages::PageBuildContext;
|
|
use crate::ui::widgets::{hotkey_row, tool_page};
|
|
use libadwaita::prelude::*;
|
|
use mangotune::config::help::display_title_for_key;
|
|
use mangotune::config::schema::entries_for_category;
|
|
use mangotune::config::types::Category;
|
|
|
|
pub fn build_page(ctx: &PageBuildContext) -> gtk4::ScrolledWindow {
|
|
let (page, body) = tool_page::build_tool_page(
|
|
"Keybindings",
|
|
"Behavior",
|
|
"Set the shortcuts that let you toggle, cycle, or inspect MangoHud while you are in a real game.",
|
|
&["hotkeys", "toggle HUD", "in-game control"],
|
|
);
|
|
|
|
let group = tool_page::append_custom_section(
|
|
&body,
|
|
"Overlay shortcuts",
|
|
"These actions change how MangoHud behaves live in game. Keep them memorable and avoid conflicts with your usual binds.",
|
|
Some("In-game control"),
|
|
);
|
|
|
|
for entry in entries_for_category(&Category::BehaviorKeybindings) {
|
|
let row = hotkey_row::build_hotkey_row(&display_title_for_key(entry.key), entry.key, ctx);
|
|
group.add(&row);
|
|
}
|
|
|
|
page
|
|
}
|