From db74b15d78ae01293dc1611dfee53e87991ac0b7 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Mon, 11 Feb 2019 19:53:34 +0100 Subject: [PATCH] core/menusystem: don't use the variable "controller" for menus --- sonic-boost.love/core/modules/menusystem/flowbox.lua | 4 ++-- sonic-boost.love/core/modules/menusystem/grid.lua | 4 ++-- sonic-boost.love/core/modules/menusystem/listbox.lua | 4 ++-- sonic-boost.love/core/modules/menusystem/parent.lua | 6 +++--- sonic-boost.love/core/modules/menusystem/textmenu.lua | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/sonic-boost.love/core/modules/menusystem/flowbox.lua b/sonic-boost.love/core/modules/menusystem/flowbox.lua index c144c8c..a5ce544 100644 --- a/sonic-boost.love/core/modules/menusystem/flowbox.lua +++ b/sonic-boost.love/core/modules/menusystem/flowbox.lua @@ -3,8 +3,8 @@ local Menu = require(cwd .. "parent") FlowBox = Menu:extend() -function FlowBox:new(controller, name, x, y, w, h, slots_hor, slots_vert) - ListBox.super.new(self, controller, name, x, y, w, h) +function FlowBox:new(menusystem, name, x, y, w, h, slots_hor, slots_vert) + ListBox.super.new(self, menusystem, name, x, y, w, h) self.slots = slots_hor * slots_vert self.slots_hor = slots_hor self.slots_vert = slots_vert diff --git a/sonic-boost.love/core/modules/menusystem/grid.lua b/sonic-boost.love/core/modules/menusystem/grid.lua index a3a7ad0..e82ca0a 100644 --- a/sonic-boost.love/core/modules/menusystem/grid.lua +++ b/sonic-boost.love/core/modules/menusystem/grid.lua @@ -4,8 +4,8 @@ local Menu = require(cwd .. "parent") GridBox = Menu:extend() -function GridBox:new(controller, name, x, y, w, h, slots_hor, slots_vert) - ListBox.super.new(self, controller, name, x, y, w, h) +function GridBox:new(menusystem, name, x, y, w, h, slots_hor, slots_vert) + ListBox.super.new(self, menusystem, name, x, y, w, h) self.slots = slots_hor * slots_vert self.slots_hor = slots_hor self.slots_vert = slots_vert diff --git a/sonic-boost.love/core/modules/menusystem/listbox.lua b/sonic-boost.love/core/modules/menusystem/listbox.lua index 53b812f..c063a10 100644 --- a/sonic-boost.love/core/modules/menusystem/listbox.lua +++ b/sonic-boost.love/core/modules/menusystem/listbox.lua @@ -3,8 +3,8 @@ local Menu = require(cwd .. "parent") ListBox = Menu:extend() -function ListBox:new(controller, name, x, y, w, h, slots) - ListBox.super.new(self, controller, name, x, y, w, h) +function ListBox:new(menusystem, name, x, y, w, h, slots) + ListBox.super.new(self, menusystem, name, x, y, w, h) self.slots = slots self.begin = 1 self.h = slots * self.widget.h -- On fait en sorte que la hauteur diff --git a/sonic-boost.love/core/modules/menusystem/parent.lua b/sonic-boost.love/core/modules/menusystem/parent.lua index c15020c..946c460 100644 --- a/sonic-boost.love/core/modules/menusystem/parent.lua +++ b/sonic-boost.love/core/modules/menusystem/parent.lua @@ -1,7 +1,7 @@ local Menu = Object:extend() -function Menu:new(controller, name, x, y, w, h) - self.controller = controller +function Menu:new(menusystem, name, x, y, w, h) + self.menusystem = menusystem self.name = name self.x = x @@ -33,7 +33,7 @@ function Menu:new(controller, name, x, y, w, h) end function Menu:register() - self.controller:addMenu(self.name, self) + self.menusystem:addMenu(self.name, self) end function Menu:setCancelWidget(id) diff --git a/sonic-boost.love/core/modules/menusystem/textmenu.lua b/sonic-boost.love/core/modules/menusystem/textmenu.lua index f7a6843..76a91d8 100644 --- a/sonic-boost.love/core/modules/menusystem/textmenu.lua +++ b/sonic-boost.love/core/modules/menusystem/textmenu.lua @@ -3,8 +3,8 @@ local Menu = require(cwd .. "parent") local TextMenu = Menu:extend() -function TextMenu:new(controller, name, x, y, font, slots) - TextMenu.super.new(self, controller, name, x, y, 0, 0) +function TextMenu:new(menusystem, name, x, y, font, slots) + TextMenu.super.new(self, menusystem, name, x, y, 0, 0) self.ox = x self.oy = y self.font = font