33 lines
768 B
TypeScript
33 lines
768 B
TypeScript
import { KeyContext } from "./key-context";
|
|
import { KeyboardManager } from "../keyboard-manager";
|
|
|
|
export class SidebarKeyContext extends KeyContext {
|
|
readonly name: string = "SidebarContext";
|
|
|
|
protected onKeyUp() {
|
|
super.onKeyUp();
|
|
this.store.moveTagUp();
|
|
}
|
|
|
|
protected onKeyDown() {
|
|
super.onKeyDown();
|
|
this.store.moveTagDown();
|
|
}
|
|
|
|
protected onKeyRight() {
|
|
super.onKeyRight();
|
|
this.store.moveGameRight();
|
|
KeyboardManager.switchContext("carousel")
|
|
}
|
|
|
|
protected onEnter() {
|
|
super.onEnter();
|
|
this.store.moveGameRight();
|
|
KeyboardManager.switchContext("carousel")
|
|
}
|
|
|
|
protected onEscape() {
|
|
super.onEscape();
|
|
// TODO options menu
|
|
}
|
|
} |