fix repeating stats button + change message in event when the key is repeating

This commit is contained in:
Greenlamp 2024-05-04 19:08:42 +02:00
parent b55eac7d5d
commit c6a2d98e4a

View File

@ -34,6 +34,7 @@ export class InputsController {
} }
// We don't want the menu key to be repeated // We don't want the menu key to be repeated
delete this.interactions[Button.MENU]; delete this.interactions[Button.MENU];
delete this.interactions[Button.STATS];
this.init(); this.init();
} }
@ -68,7 +69,7 @@ export class InputsController {
if (!this.interactions.hasOwnProperty(b)) continue; if (!this.interactions.hasOwnProperty(b)) continue;
if (this.repeatInputDurationJustPassed(b)) { if (this.repeatInputDurationJustPassed(b)) {
this.events.emit('input_down', { this.events.emit('input_down', {
controller_type: 'keyboard', controller_type: 'repeated',
button: b, button: b,
}); });
this.setLastProcessedMovementTime(b); this.setLastProcessedMovementTime(b);