diff --git a/src/components/Menu.js b/src/components/Menu.js index fd49c16..d990946 100644 --- a/src/components/Menu.js +++ b/src/components/Menu.js @@ -34,18 +34,14 @@ export default Blits.Component('Menu', { state() { return { x: -360, - focused: null, + focused: 1, } }, hooks: { focus() { - this.focused = 1 this.$trigger('focused') this.x = 0 }, - unfocus() { - this.x = -360 - }, }, watch: { focused() { @@ -56,6 +52,7 @@ export default Blits.Component('Menu', { input: { right() { this.parent.focus() + this.x = -360 }, down() { this.focused = Math.min(this.focused + 1, 4) @@ -63,5 +60,6 @@ export default Blits.Component('Menu', { up() { this.focused = Math.max(this.focused - 1, 1) }, + left() {}, }, }) diff --git a/src/pages/FocusHandling.js b/src/pages/FocusHandling.js index 076e77f..758f5ff 100644 --- a/src/pages/FocusHandling.js +++ b/src/pages/FocusHandling.js @@ -41,12 +41,11 @@ export default Blits.Component('FocusHandling', { `, state() { return { - focused: null, + focused: 1, } }, hooks: { focus() { - this.focused = 1 this.$trigger('focused') }, },