From 4fb874dea7822d161d4c4c50c44e85935ac5d619 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Tue, 23 Mar 2021 14:07:58 +0100 Subject: [PATCH] fix: fix cursor transitions --- sonic-radiance.love/scenes/overworld/screens/mainmenu/items.lua | 1 + sonic-radiance.love/scenes/overworld/screens/mainmenu/pause.lua | 1 + 2 files changed, 2 insertions(+) diff --git a/sonic-radiance.love/scenes/overworld/screens/mainmenu/items.lua b/sonic-radiance.love/scenes/overworld/screens/mainmenu/items.lua index d8ad2c6..d143184 100644 --- a/sonic-radiance.love/scenes/overworld/screens/mainmenu/items.lua +++ b/sonic-radiance.love/scenes/overworld/screens/mainmenu/items.lua @@ -65,6 +65,7 @@ function ItemsScreen:setMenu(widgetId) self.scene.menusystem:switchMenu("menu") self.scene.menusystem.menus["menu"].isLocked = true 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 function ItemsScreen:setUseMenu(item, widgetId) diff --git a/sonic-radiance.love/scenes/overworld/screens/mainmenu/pause.lua b/sonic-radiance.love/scenes/overworld/screens/mainmenu/pause.lua index 6c2ad53..8479085 100644 --- a/sonic-radiance.love/scenes/overworld/screens/mainmenu/pause.lua +++ b/sonic-radiance.love/scenes/overworld/screens/mainmenu/pause.lua @@ -49,6 +49,7 @@ function PauseScreen:setMenu() self.scene.menusystem.menus["main"].isVisible = true if (self.widgetSelected ~= nil) then self.scene.menusystem.menus[self.menuSelected].widget.selected = self.widgetSelected + self.scene.menusystem.menus[self.menuSelected].cursorTransition = self.widgetSelected - 1 end end