feat First implementation of plugins system
feat: Added PCSX2 integration feat: Revamped UI a bit made it look better on light mode
This commit is contained in:
parent
d85268fad7
commit
a78e75335f
95 changed files with 2639 additions and 1259 deletions
|
|
@ -3,48 +3,48 @@ import { GamePadButtonCode, Shortcut } from '../scripts/shortcuts';
|
|||
import ShortcutPrompt from './ShortcutPrompt';
|
||||
import { IconType } from './SvgIcon';
|
||||
|
||||
const iconMap: Record<GamePadButtonCode, IconType> = {
|
||||
[GamePadButtonCode.A]: 'steamdeck_button_a',
|
||||
[GamePadButtonCode.B]: 'steamdeck_button_b',
|
||||
[GamePadButtonCode.X]: 'steamdeck_button_x',
|
||||
[GamePadButtonCode.Y]: 'steamdeck_button_y',
|
||||
[GamePadButtonCode.L1]: 'steamdeck_button_l1',
|
||||
[GamePadButtonCode.R1]: 'steamdeck_button_r1',
|
||||
[GamePadButtonCode.L2]: 'steamdeck_button_l2',
|
||||
[GamePadButtonCode.R2]: 'steamdeck_button_r2',
|
||||
[GamePadButtonCode.Select]: 'steamdeck_button_guide',
|
||||
[GamePadButtonCode.Start]: 'steamdeck_button_options',
|
||||
[GamePadButtonCode.LJoy]: 'steamdeck_stick_l_press',
|
||||
[GamePadButtonCode.RJoy]: 'steamdeck_stick_r_press',
|
||||
[GamePadButtonCode.Up]: 'steamdeck_dpad_up',
|
||||
[GamePadButtonCode.Down]: 'steamdeck_dpad_down',
|
||||
[GamePadButtonCode.Left]: 'steamdeck_dpad_left',
|
||||
[GamePadButtonCode.Right]: 'steamdeck_dpad_right',
|
||||
[GamePadButtonCode.Steam]: 'steamdeck_button_quickaccess'
|
||||
};
|
||||
|
||||
const keyboardMap: Record<GamePadButtonCode, string> = {
|
||||
[GamePadButtonCode.A]: 'ENTER',
|
||||
[GamePadButtonCode.B]: 'ESC',
|
||||
[GamePadButtonCode.X]: 'BACKSPACE',
|
||||
[GamePadButtonCode.Y]: 'SPACE',
|
||||
[GamePadButtonCode.L1]: 'Q',
|
||||
[GamePadButtonCode.R1]: 'E',
|
||||
[GamePadButtonCode.L2]: '',
|
||||
[GamePadButtonCode.R2]: '',
|
||||
[GamePadButtonCode.Select]: '',
|
||||
[GamePadButtonCode.Start]: '',
|
||||
[GamePadButtonCode.LJoy]: '',
|
||||
[GamePadButtonCode.RJoy]: '',
|
||||
[GamePadButtonCode.Up]: '',
|
||||
[GamePadButtonCode.Down]: '',
|
||||
[GamePadButtonCode.Left]: '',
|
||||
[GamePadButtonCode.Right]: '',
|
||||
[GamePadButtonCode.Steam]: ''
|
||||
};
|
||||
|
||||
export default function Shortcuts (data: { shortcuts?: Shortcut[]; })
|
||||
{
|
||||
const iconMap: Record<GamePadButtonCode, IconType> = {
|
||||
[GamePadButtonCode.A]: 'steamdeck_button_a',
|
||||
[GamePadButtonCode.B]: 'steamdeck_button_b',
|
||||
[GamePadButtonCode.X]: 'steamdeck_button_x',
|
||||
[GamePadButtonCode.Y]: 'steamdeck_button_y',
|
||||
[GamePadButtonCode.L1]: 'steamdeck_button_l1',
|
||||
[GamePadButtonCode.R1]: 'steamdeck_button_r1',
|
||||
[GamePadButtonCode.L2]: 'steamdeck_button_l2',
|
||||
[GamePadButtonCode.R2]: 'steamdeck_button_r2',
|
||||
[GamePadButtonCode.Select]: 'steamdeck_button_guide',
|
||||
[GamePadButtonCode.Start]: 'steamdeck_button_options',
|
||||
[GamePadButtonCode.LJoy]: 'steamdeck_stick_l_press',
|
||||
[GamePadButtonCode.RJoy]: 'steamdeck_stick_r_press',
|
||||
[GamePadButtonCode.Up]: 'steamdeck_dpad_up',
|
||||
[GamePadButtonCode.Down]: 'steamdeck_dpad_down',
|
||||
[GamePadButtonCode.Left]: 'steamdeck_dpad_left',
|
||||
[GamePadButtonCode.Right]: 'steamdeck_dpad_right',
|
||||
[GamePadButtonCode.Steam]: 'steamdeck_button_quickaccess'
|
||||
};
|
||||
|
||||
const keyboardMap: Record<GamePadButtonCode, string> = {
|
||||
[GamePadButtonCode.A]: 'ENTER',
|
||||
[GamePadButtonCode.B]: 'ESC',
|
||||
[GamePadButtonCode.X]: 'BACKSPACE',
|
||||
[GamePadButtonCode.Y]: 'SPACE',
|
||||
[GamePadButtonCode.L1]: 'Q',
|
||||
[GamePadButtonCode.R1]: 'E',
|
||||
[GamePadButtonCode.L2]: '',
|
||||
[GamePadButtonCode.R2]: '',
|
||||
[GamePadButtonCode.Select]: '',
|
||||
[GamePadButtonCode.Start]: '',
|
||||
[GamePadButtonCode.LJoy]: '',
|
||||
[GamePadButtonCode.RJoy]: '',
|
||||
[GamePadButtonCode.Up]: '',
|
||||
[GamePadButtonCode.Down]: '',
|
||||
[GamePadButtonCode.Left]: '',
|
||||
[GamePadButtonCode.Right]: '',
|
||||
[GamePadButtonCode.Steam]: ''
|
||||
};
|
||||
|
||||
const { control } = useActiveControl();
|
||||
const showKeyboard = control === 'keyboard' || control === 'mouse';
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue