mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-14 20:32:17 +02:00
adding essential data into config file
This commit is contained in:
parent
022c4351d3
commit
043216aa75
@ -1,3 +1,6 @@
|
|||||||
|
import {SettingGamepad} from "../system/settings-gamepad";
|
||||||
|
import {Button} from "../enums/buttons";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dualshock mapping
|
* Dualshock mapping
|
||||||
*/
|
*/
|
||||||
@ -21,7 +24,6 @@ const pad_dualshock = {
|
|||||||
LC_S: 13,
|
LC_S: 13,
|
||||||
LC_W: 14,
|
LC_W: 14,
|
||||||
LC_E: 15,
|
LC_E: 15,
|
||||||
MENU: 16,
|
|
||||||
TOUCH: 17
|
TOUCH: 17
|
||||||
},
|
},
|
||||||
icons: {
|
icons: {
|
||||||
@ -41,8 +43,28 @@ const pad_dualshock = {
|
|||||||
LC_S: "T_P4_Dpad_Down_Default.png",
|
LC_S: "T_P4_Dpad_Down_Default.png",
|
||||||
LC_W: "T_P4_Dpad_Left_Default.png",
|
LC_W: "T_P4_Dpad_Left_Default.png",
|
||||||
LC_E: "T_P4_Dpad_Right_Default.png",
|
LC_E: "T_P4_Dpad_Right_Default.png",
|
||||||
MENU: "",
|
|
||||||
TOUCH: "T_P4_Touch_Pad_Default.png"
|
TOUCH: "T_P4_Touch_Pad_Default.png"
|
||||||
|
},
|
||||||
|
setting: {
|
||||||
|
RC_S: SettingGamepad.Button_Action,
|
||||||
|
RC_E: SettingGamepad.Button_Cancel,
|
||||||
|
},
|
||||||
|
default: {
|
||||||
|
RC_S: Button.ACTION,
|
||||||
|
RC_E: Button.CANCEL,
|
||||||
|
RC_W: Button.CYCLE_NATURE,
|
||||||
|
RC_N: Button.CYCLE_VARIANT,
|
||||||
|
START: Button.MENU,
|
||||||
|
SELECT: Button.STATS,
|
||||||
|
LB: Button.CYCLE_FORM,
|
||||||
|
RB: Button.CYCLE_SHINY,
|
||||||
|
LT: Button.CYCLE_GENDER,
|
||||||
|
RT: Button.CYCLE_ABILITY,
|
||||||
|
LC_N: Button.UP,
|
||||||
|
LC_S: Button.DOWN,
|
||||||
|
LC_W: Button.LEFT,
|
||||||
|
LC_E: Button.RIGHT,
|
||||||
|
TOUCH: Button.SUBMIT,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
import {SettingGamepad} from "../system/settings-gamepad";
|
||||||
|
import {Button} from "../enums/buttons";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generic pad mapping
|
* Generic pad mapping
|
||||||
*/
|
*/
|
||||||
@ -40,6 +43,27 @@ const pad_generic = {
|
|||||||
LC_W: "T_X_Dpad_Left_Alt.png",
|
LC_W: "T_X_Dpad_Left_Alt.png",
|
||||||
LC_E: "T_X_Dpad_Right_Alt.png",
|
LC_E: "T_X_Dpad_Right_Alt.png",
|
||||||
MENU: ""
|
MENU: ""
|
||||||
|
},
|
||||||
|
setting: {
|
||||||
|
RC_S: SettingGamepad.Button_Action,
|
||||||
|
RC_E: SettingGamepad.Button_Cancel,
|
||||||
|
},
|
||||||
|
default: {
|
||||||
|
RC_S: Button.ACTION,
|
||||||
|
RC_E: Button.CANCEL,
|
||||||
|
RC_W: Button.CYCLE_NATURE,
|
||||||
|
RC_N: Button.CYCLE_VARIANT,
|
||||||
|
START: Button.MENU,
|
||||||
|
SELECT: Button.STATS,
|
||||||
|
LB: Button.CYCLE_FORM,
|
||||||
|
RB: Button.CYCLE_SHINY,
|
||||||
|
LT: Button.CYCLE_GENDER,
|
||||||
|
RT: Button.CYCLE_ABILITY,
|
||||||
|
LC_N: Button.UP,
|
||||||
|
LC_S: Button.DOWN,
|
||||||
|
LC_W: Button.LEFT,
|
||||||
|
LC_E: Button.RIGHT,
|
||||||
|
TOUCH: Button.SUBMIT,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
import {SettingGamepad} from "../system/settings-gamepad";
|
||||||
|
import {Button} from "../enums/buttons";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 081f-e401 - UnlicensedSNES
|
* 081f-e401 - UnlicensedSNES
|
||||||
*/
|
*/
|
||||||
@ -31,6 +34,25 @@ const pad_unlicensedSNES = {
|
|||||||
LC_S: "T_X_Dpad_Down_Alt.png",
|
LC_S: "T_X_Dpad_Down_Alt.png",
|
||||||
LC_W: "T_X_Dpad_Left_Alt.png",
|
LC_W: "T_X_Dpad_Left_Alt.png",
|
||||||
LC_E: "T_X_Dpad_Right_Alt.png",
|
LC_E: "T_X_Dpad_Right_Alt.png",
|
||||||
|
},
|
||||||
|
setting: {
|
||||||
|
RC_S: SettingGamepad.Button_Action,
|
||||||
|
RC_E: SettingGamepad.Button_Cancel,
|
||||||
|
},
|
||||||
|
default: {
|
||||||
|
RC_S: Button.ACTION,
|
||||||
|
RC_E: Button.CANCEL,
|
||||||
|
RC_W: Button.CYCLE_NATURE,
|
||||||
|
RC_N: Button.CYCLE_VARIANT,
|
||||||
|
START: Button.MENU,
|
||||||
|
SELECT: Button.STATS,
|
||||||
|
LB: Button.CYCLE_FORM,
|
||||||
|
RB: Button.CYCLE_SHINY,
|
||||||
|
LC_N: Button.UP,
|
||||||
|
LC_S: Button.DOWN,
|
||||||
|
LC_W: Button.LEFT,
|
||||||
|
LC_E: Button.RIGHT,
|
||||||
|
TOUCH: Button.SUBMIT,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -18,11 +18,21 @@ export interface IconsMapping {
|
|||||||
[key: string]: string;
|
[key: string]: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface SettingMapping {
|
||||||
|
[key: string]: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface DefaultMapping {
|
||||||
|
[key: string]: Button;
|
||||||
|
}
|
||||||
|
|
||||||
export interface GamepadConfig {
|
export interface GamepadConfig {
|
||||||
padID: string;
|
padID: string;
|
||||||
padType: string;
|
padType: string;
|
||||||
gamepadMapping: GamepadMapping;
|
gamepadMapping: GamepadMapping;
|
||||||
icons: IconsMapping;
|
icons: IconsMapping;
|
||||||
|
setting: SettingMapping;
|
||||||
|
default: DefaultMapping;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ActionGamepadMapping {
|
export interface ActionGamepadMapping {
|
||||||
@ -289,6 +299,7 @@ export class InputsController {
|
|||||||
this.player[gamepad]['custom'] = mappedPad.gamepadMapping;
|
this.player[gamepad]['custom'] = mappedPad.gamepadMapping;
|
||||||
this.player[gamepad]['icons'] = mappedPad.icons;
|
this.player[gamepad]['icons'] = mappedPad.icons;
|
||||||
this.player[gamepad]['type'] = mappedPad.padType;
|
this.player[gamepad]['type'] = mappedPad.padType;
|
||||||
|
this.player[gamepad]['default'] = mappedPad.default;
|
||||||
}
|
}
|
||||||
if (this.chosenGamepad === thisGamepad.id) this.initChosenGamepad(this.chosenGamepad)
|
if (this.chosenGamepad === thisGamepad.id) this.initChosenGamepad(this.chosenGamepad)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user