diff --git a/sonic-boost.love/core/modules/menusystem/flowbox.lua b/sonic-boost.love/core/modules/menusystem/flowbox.lua index 9446f8e..c5a7d6d 100644 --- a/sonic-boost.love/core/modules/menusystem/flowbox.lua +++ b/sonic-boost.love/core/modules/menusystem/flowbox.lua @@ -153,7 +153,7 @@ function FlowBox:draw() for i,v in ipairs(self.widget.list) do if (i >= self.begin) and (i < self.begin + self.slots) then v:draw(widgetx, widgety, self.widget.w, self.widget.h) - if self.widget.selected == i and self.focus == true then + if self.widget.selected == i and self.haveFocus == true then v:drawSelected(widgetx, widgety, self.widget.w, self.widget.h) else v:draw(widgetx, widgety, self.widget.w, self.widget.h) diff --git a/sonic-boost.love/core/modules/menusystem/grid.lua b/sonic-boost.love/core/modules/menusystem/grid.lua index 30a00a9..07d07d6 100644 --- a/sonic-boost.love/core/modules/menusystem/grid.lua +++ b/sonic-boost.love/core/modules/menusystem/grid.lua @@ -206,7 +206,7 @@ function GridBox:draw() for i,v in ipairs(self.listSlot) do if (v.isSlave == 0) and (v.widgetID <= #self.widget.list) then --self.widget.list[v.widgetID]:draw(widgetx, widgety, self.widget.w * v.sizeW, self.widget.h * v.sizeH) - if self.widget.selected == v.widgetID and self.focus == true then + if self.widget.selected == v.widgetID and self.haveFocus == true then self.widget.list[v.widgetID]:drawSelected(widgetx, widgety, self.widget.w * v.sizeW, self.widget.h * v.sizeH) else self.widget.list[v.widgetID]:draw(widgetx, widgety, self.widget.w * v.sizeW, self.widget.h * v.sizeH) diff --git a/sonic-boost.love/core/modules/menusystem/init.lua b/sonic-boost.love/core/modules/menusystem/init.lua index d882d5d..4d7bafe 100644 --- a/sonic-boost.love/core/modules/menusystem/init.lua +++ b/sonic-boost.love/core/modules/menusystem/init.lua @@ -73,9 +73,9 @@ function MenuSystem:mousepressed( x, y, button, istouch ) if (x > v.x) and (x < v.x + v.w) and (y > v.y) and (y < v.y + v.h) then v:mousepressed(x - v.x, y - v.y, button, istouch ) for j,u in ipairs(self.menus) do - u.focus = false + u.haveFocus = false end - v.focus = true + v.haveFocus = true end end end diff --git a/sonic-boost.love/core/modules/menusystem/listbox.lua b/sonic-boost.love/core/modules/menusystem/listbox.lua index ab7a7d5..eeb59d5 100644 --- a/sonic-boost.love/core/modules/menusystem/listbox.lua +++ b/sonic-boost.love/core/modules/menusystem/listbox.lua @@ -73,7 +73,7 @@ function ListBox:draw() for i,v in ipairs(self.widget.list) do if (i >= self.begin) and (i < self.begin + self.slots) then v:draw(self.x, widgety, self.w, self.widget.h) - if self.widget.selected == i and self.focus == true then + if self.widget.selected == i and self.haveFocus == true then v:drawSelected(self.x, widgety, self.w, self.widget.h) else v:draw(self.x, widgety, self.w, self.widget.h)