core/menusystem: add back cancel button support

This commit is contained in:
Kazhnuz 2019-02-28 21:43:47 +01:00
parent a2f15bf14e
commit b99c84c86f
1 changed files with 6 additions and 0 deletions

View File

@ -52,6 +52,12 @@ function ListBox:keyreleased(key, code)
end
end
if key == "B" then
if (self.widget.cancel >= 1 and self.widget.cancel <= #self.widget.list) then
self.widget.list[self.widget.cancel]:action()
end
end
end
function ListBox:mousemoved(x, y)