feat: Moved to stream zip downloading.
feat: Implemented Shortcuts. feat: Ensured it works on steam deck
This commit is contained in:
parent
f15bf9a1e0
commit
62f16cbcc1
45 changed files with 1415 additions and 631 deletions
|
|
@ -17,12 +17,17 @@ let setCurrentFocusedKey = SpatialNavigation.setCurrentFocusedKey.bind(SpatialNa
|
|||
|
||||
type SaveFocusType = "session" | "local";
|
||||
|
||||
type HistorySourceType = "settings" | 'details' | 'launch';
|
||||
type HistorySourceType = "settings" | 'details' | 'launch' | 'game-list';
|
||||
const historySourceMap = new Map<string, string>();
|
||||
|
||||
export function SaveSource (id: HistorySourceType, url?: string)
|
||||
{
|
||||
historySourceMap.set(id, url ?? location.hash.replace("#", ''));
|
||||
const finalUrl = url ?? location.hash.replace("#", '');
|
||||
if (finalUrl)
|
||||
{
|
||||
historySourceMap.set(id, finalUrl);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export function HasSource (id: HistorySourceType)
|
||||
|
|
@ -46,6 +51,27 @@ export function GetFocusedElement (focusKey: string)
|
|||
return (SpatialNavigation as any).focusableComponents[focusKey]?.node as HTMLElement;
|
||||
}
|
||||
|
||||
export function GetFocusedTree (leaf: string): string[]
|
||||
{
|
||||
const tree: string[] = [];
|
||||
let component = (SpatialNavigation as any).focusableComponents[leaf];
|
||||
while (component)
|
||||
{
|
||||
tree.push(component.focusKey);
|
||||
|
||||
if (component.parentFocusKey && !tree.includes(component.parentFocusKey))
|
||||
{
|
||||
component = (SpatialNavigation as any).focusableComponents[component.parentFocusKey];
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return tree;
|
||||
}
|
||||
|
||||
export function dispatchFocusedEvent (event: Event, override?: Element | Window)
|
||||
{
|
||||
const focusedElement = GetFocusedElement(getCurrentFocusKey());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue