core/menusystem: don't use the variable "controller" for menus
This commit is contained in:
parent
dbfe4747f9
commit
db74b15d78
5 changed files with 11 additions and 11 deletions
|
@ -3,8 +3,8 @@ local Menu = require(cwd .. "parent")
|
||||||
|
|
||||||
FlowBox = Menu:extend()
|
FlowBox = Menu:extend()
|
||||||
|
|
||||||
function FlowBox:new(controller, name, x, y, w, h, slots_hor, slots_vert)
|
function FlowBox:new(menusystem, name, x, y, w, h, slots_hor, slots_vert)
|
||||||
ListBox.super.new(self, controller, name, x, y, w, h)
|
ListBox.super.new(self, menusystem, name, x, y, w, h)
|
||||||
self.slots = slots_hor * slots_vert
|
self.slots = slots_hor * slots_vert
|
||||||
self.slots_hor = slots_hor
|
self.slots_hor = slots_hor
|
||||||
self.slots_vert = slots_vert
|
self.slots_vert = slots_vert
|
||||||
|
|
|
@ -4,8 +4,8 @@ local Menu = require(cwd .. "parent")
|
||||||
|
|
||||||
GridBox = Menu:extend()
|
GridBox = Menu:extend()
|
||||||
|
|
||||||
function GridBox:new(controller, name, x, y, w, h, slots_hor, slots_vert)
|
function GridBox:new(menusystem, name, x, y, w, h, slots_hor, slots_vert)
|
||||||
ListBox.super.new(self, controller, name, x, y, w, h)
|
ListBox.super.new(self, menusystem, name, x, y, w, h)
|
||||||
self.slots = slots_hor * slots_vert
|
self.slots = slots_hor * slots_vert
|
||||||
self.slots_hor = slots_hor
|
self.slots_hor = slots_hor
|
||||||
self.slots_vert = slots_vert
|
self.slots_vert = slots_vert
|
||||||
|
|
|
@ -3,8 +3,8 @@ local Menu = require(cwd .. "parent")
|
||||||
|
|
||||||
ListBox = Menu:extend()
|
ListBox = Menu:extend()
|
||||||
|
|
||||||
function ListBox:new(controller, name, x, y, w, h, slots)
|
function ListBox:new(menusystem, name, x, y, w, h, slots)
|
||||||
ListBox.super.new(self, controller, name, x, y, w, h)
|
ListBox.super.new(self, menusystem, name, x, y, w, h)
|
||||||
self.slots = slots
|
self.slots = slots
|
||||||
self.begin = 1
|
self.begin = 1
|
||||||
self.h = slots * self.widget.h -- On fait en sorte que la hauteur
|
self.h = slots * self.widget.h -- On fait en sorte que la hauteur
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
local Menu = Object:extend()
|
local Menu = Object:extend()
|
||||||
|
|
||||||
function Menu:new(controller, name, x, y, w, h)
|
function Menu:new(menusystem, name, x, y, w, h)
|
||||||
self.controller = controller
|
self.menusystem = menusystem
|
||||||
self.name = name
|
self.name = name
|
||||||
|
|
||||||
self.x = x
|
self.x = x
|
||||||
|
@ -33,7 +33,7 @@ function Menu:new(controller, name, x, y, w, h)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Menu:register()
|
function Menu:register()
|
||||||
self.controller:addMenu(self.name, self)
|
self.menusystem:addMenu(self.name, self)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Menu:setCancelWidget(id)
|
function Menu:setCancelWidget(id)
|
||||||
|
|
|
@ -3,8 +3,8 @@ local Menu = require(cwd .. "parent")
|
||||||
|
|
||||||
local TextMenu = Menu:extend()
|
local TextMenu = Menu:extend()
|
||||||
|
|
||||||
function TextMenu:new(controller, name, x, y, font, slots)
|
function TextMenu:new(menusystem, name, x, y, font, slots)
|
||||||
TextMenu.super.new(self, controller, name, x, y, 0, 0)
|
TextMenu.super.new(self, menusystem, name, x, y, 0, 0)
|
||||||
self.ox = x
|
self.ox = x
|
||||||
self.oy = y
|
self.oy = y
|
||||||
self.font = font
|
self.font = font
|
||||||
|
|
Loading…
Reference in a new issue