Fix crash with keyboard navigation of onHold buttontables (#3307)

* Fix crash with keyboard navigation of onHold buttontables

Would crash when encountering a separator or when the number
of buttons in a row changes.

* Reset previous selected item on new buttontable
This commit is contained in:
poire-z
2017-10-07 12:11:00 +02:00
committed by Frans de Jonge
parent b7785753c6
commit e6fcea6e26
2 changed files with 8 additions and 0 deletions

View File

@@ -27,6 +27,7 @@ local ButtonTable = FocusManager:new{
}
function ButtonTable:init()
self.selected = { x = 1, y = 1 }
self.buttons_layout = {}
self.container = VerticalGroup:new{ width = self.width }
table.insert(self, self.container)