feat: added search to controller hints
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
This commit is contained in:
		| @@ -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) | ||||
|   | ||||
							
								
								
									
										1
									
								
								portprotonqt/themes/standart/images/ps_square.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								portprotonqt/themes/standart/images/ps_square.svg
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| <svg width="48" height="48" version="1.1" viewBox="0 0 48 48" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="m47 24a23 23 0 0 1-23 23 23 23 0 0 1-23-23 23 23 0 0 1 23-23 23 23 0 0 1 23 23z" fill="#3f424d"/><path d="M 42.513,24 A 18.513,18.513 0 0 1 24,42.513 18.513,18.513 0 0 1 5.4869995,24 18.513,18.513 0 0 1 24,5.4869995 18.513,18.513 0 0 1 42.513,24 Z" fill="#fff"/><path d="m33.019 13.476h-18.037c-0.8274 0-1.5059 0.67847-1.5059 1.5059v18.037c0 0.8274 0.67847 1.5059 1.5059 1.5059h18.037c0.8274 0 1.5059-0.67847 1.5059-1.5059v-18.037c0-0.8274-0.66192-1.5059-1.5059-1.5059zm-1.4893 18.037h-15.026v-15.026h15.026z" fill="#3f424d" stroke-width="1.6548"/></svg> | ||||
| After Width: | Height: | Size: 682 B | 
							
								
								
									
										1
									
								
								portprotonqt/themes/standart/images/xbox_y.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								portprotonqt/themes/standart/images/xbox_y.svg
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| <svg width="48" height="48" version="1.1" viewBox="0 0 48 48" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="m47 24a23 23 0 0 1-23 23 23 23 0 0 1-23-23 23 23 0 0 1 23-23 23 23 0 0 1 23 23z" fill="#3f424d"/><path d="M 42.513,24 A 18.513,18.513 0 0 1 24,42.513 18.513,18.513 0 0 1 5.4869995,24 18.513,18.513 0 0 1 24,5.4869995 18.513,18.513 0 0 1 42.513,24 Z" fill="#fff"/><path d="m21.438 26.092-7.6218-12.616h5.7406l4.4433 8.238 4.4109-8.238h5.7731l-7.6866 12.552v8.4974h-5.0595z" fill="#3f424d" stroke-width="1.0811" aria-label="Y"/></svg> | ||||
| After Width: | Height: | Size: 559 B | 
		Reference in New Issue
	
	Block a user