fix: fix cursor transitions

This commit is contained in:
Kazhnuz 2021-03-23 14:07:58 +01:00
parent 025b645cc8
commit 4fb874dea7
2 changed files with 2 additions and 0 deletions

View file

@ -65,6 +65,7 @@ function ItemsScreen:setMenu(widgetId)
self.scene.menusystem:switchMenu("menu") self.scene.menusystem:switchMenu("menu")
self.scene.menusystem.menus["menu"].isLocked = true self.scene.menusystem.menus["menu"].isLocked = true
self.scene.menusystem.menus["menu"].widget.selected = math.max(1, self.widgetIndex) self.scene.menusystem.menus["menu"].widget.selected = math.max(1, self.widgetIndex)
self.scene.menusystem.menus["menu"].cursorTransition = math.max(0, self.widgetIndex - 1)
end end
function ItemsScreen:setUseMenu(item, widgetId) function ItemsScreen:setUseMenu(item, widgetId)

View file

@ -49,6 +49,7 @@ function PauseScreen:setMenu()
self.scene.menusystem.menus["main"].isVisible = true self.scene.menusystem.menus["main"].isVisible = true
if (self.widgetSelected ~= nil) then if (self.widgetSelected ~= nil) then
self.scene.menusystem.menus[self.menuSelected].widget.selected = self.widgetSelected self.scene.menusystem.menus[self.menuSelected].widget.selected = self.widgetSelected
self.scene.menusystem.menus[self.menuSelected].cursorTransition = self.widgetSelected - 1
end end
end end