mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-08-06 13:18:27 +02:00
Update MKB codes
This commit is contained in:
2
src/types/index.d.ts
vendored
2
src/types/index.d.ts
vendored
@@ -39,6 +39,8 @@ type BxStates = {
|
||||
appContext: any | null;
|
||||
}
|
||||
|
||||
type DualEnum = {[index: string]: number} & {[index: number]: string};
|
||||
|
||||
declare var window: Window & typeof globalThis;
|
||||
declare var AppInterface: any;
|
||||
declare var STREAM_WEBRTC: RTCPeerConnection;
|
||||
|
27
src/types/mkb.d.ts
vendored
Normal file
27
src/types/mkb.d.ts
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
import { MkbPresetKey } from "../modules/mkb/definitions";
|
||||
|
||||
type GamepadKeyNameType = {[index: string | number]: string[]};
|
||||
|
||||
type MkbStoredPreset = {
|
||||
id?: number;
|
||||
name: string;
|
||||
data: MkbPresetData;
|
||||
};
|
||||
|
||||
type MkbStoredPresets = {
|
||||
[index: number]: MkbStoredPreset;
|
||||
}
|
||||
|
||||
type MkbPresetData = {
|
||||
mapping: {[index: number]: (string | null)[]};
|
||||
mouse: Omit<{
|
||||
[index in MkbPresetKey]: number | null;
|
||||
}, MkbPresetKey.MOUSE_MAP_TO> & {
|
||||
[MkbPresetKey.MOUSE_MAP_TO]?: string;
|
||||
};
|
||||
};
|
||||
|
||||
type MkbConvertedPresetData = {
|
||||
mapping: {[index: string]: number?};
|
||||
mouse: MkbNormalPreset.mouse;
|
||||
};
|
18
src/types/preferences.d.ts
vendored
Normal file
18
src/types/preferences.d.ts
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
export type PreferenceSetting = {
|
||||
default: any;
|
||||
options?: {[index: string]: string};
|
||||
multiple_options?: {[index: string]: string};
|
||||
unsupported?: string | boolean;
|
||||
note?: string | HTMLElement;
|
||||
type?: SettingElementType;
|
||||
ready?: () => void;
|
||||
migrate?: (savedPrefs: any, value: any) => {};
|
||||
min?: number;
|
||||
max?: number;
|
||||
steps?: number;
|
||||
experimental?: boolean;
|
||||
params?: any;
|
||||
label?: string;
|
||||
};
|
||||
|
||||
export type PreferenceSettings = {[index in PrefKey]: PreferenceSetting};
|
Reference in New Issue
Block a user