feat: added search to controller hints

Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
This commit is contained in:
2025-10-09 16:36:07 +05:00
committed by Boris Yumankulov
parent e5af354b56
commit 6ef7a03366
3 changed files with 8 additions and 2 deletions

View File

@@ -252,6 +252,10 @@ class MainWindow(QMainWindow):
GamepadType.XBOX: "xbox_view",
GamepadType.PLAYSTATION: "ps_share",
},
'search': {
GamepadType.XBOX: "xbox_y",
GamepadType.PLAYSTATION: "ps_square",
},
}
return mappings.get(action, {}).get(gtype, "placeholder")
@@ -290,6 +294,7 @@ class MainWindow(QMainWindow):
("add_game", _("Add Game")),
("context_menu", _("Menu")),
("menu", _("Fullscreen")),
("search", _("Search")),
]
keyboard_hints = [
@@ -402,7 +407,7 @@ class MainWindow(QMainWindow):
gtype = self.input_manager.gamepad_type
logger.debug("Updating control hints, gamepad connected: %s, type: %s", is_gamepad_connected, gtype.value)
gamepad_actions = ['confirm', 'back', 'add_game', 'context_menu', 'menu']
gamepad_actions = ['confirm', 'back', 'add_game', 'context_menu', 'menu', 'search']
for container, icon_label, action in self.hintsLabels:
if action in gamepad_actions: # Gamepad hint
@@ -434,7 +439,6 @@ class MainWindow(QMainWindow):
# Update navigation buttons
self.updateNavButtons()
@Slot(list)
def on_games_loaded(self, games: list[tuple]):
self.game_library_manager.set_games(games)