mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-22 12:26:32 +00:00
alt-r to redraw graphics
This commit is contained in:
@@ -48,6 +48,10 @@ export class AlternateViewEvent implements GameEvent {
|
||||
constructor(public readonly alternateView: boolean) { }
|
||||
}
|
||||
|
||||
export class RefreshGraphicsEvent implements GameEvent {
|
||||
|
||||
}
|
||||
|
||||
export class InputHandler {
|
||||
|
||||
private lastPointerX: number = 0;
|
||||
@@ -96,6 +100,10 @@ export class InputHandler {
|
||||
this.alternateView = false
|
||||
this.eventBus.emit(new AlternateViewEvent(false))
|
||||
}
|
||||
if (e.key.toLowerCase() === 'r' && e.altKey && !e.ctrlKey) {
|
||||
e.preventDefault();
|
||||
this.eventBus.emit(new RefreshGraphicsEvent())
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user