diff options
author | Aki <nthirtyone@gmail.com> | 2017-09-03 19:59:32 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2017-09-03 19:59:32 +0200 |
commit | 20d03d8917ba38568fc56dc53576efb22c1d459c (patch) | |
tree | cf5a1d119daafe71f952dd9d6493dd2cc3a13a83 /not/Selector.lua | |
parent | 95d168815633f55b884cddc9d1364ae25497d882 (diff) | |
download | roflnauts-20d03d8917ba38568fc56dc53576efb22c1d459c.zip roflnauts-20d03d8917ba38568fc56dc53576efb22c1d459c.tar.gz roflnauts-20d03d8917ba38568fc56dc53576efb22c1d459c.tar.bz2 |
Variables initialized in constructor
Diffstat (limited to 'not/Selector.lua')
-rw-r--r-- | not/Selector.lua | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/not/Selector.lua b/not/Selector.lua index ef78778..5e54f6e 100644 --- a/not/Selector.lua +++ b/not/Selector.lua @@ -1,5 +1,3 @@ -require "not.Element" - --- `Selector` -- Used in Menu for selecting various things from list. Works for each Controller set or globally. --[[ @@ -14,29 +12,19 @@ selector:new(menu) :set("global", false) -- true: single selector; false: selector for each controller set present :init() ]] -Selector = Element:extends() - -Selector.width = 0 -Selector.height = 0 -Selector.margin = 0 -Selector.focused = false -Selector.global = false -Selector.delay = 2 -Selector.first = false -Selector.list = --[[]]nil -Selector.sets = --[[]]nil -Selector.locks = --[[]]nil -Selector.selections = --[[]]nil -Selector.shape = "portrait" -Selector.sprite = --[[]]nil -Selector.quads = --[[]]nil -Selector.icons_i = --[[]]nil -Selector.icons_q = --[[]]nil +Selector = require "not.Element":extends() --- Constructor function Selector:new (parent) Selector.__super.new(self, parent) self.sprite, self.quads = parent:getSheet() + self.width = 0 + self.height = 0 + self.margin = 0 + self.focused = false + self.global = false + self.delay = 2 + self.first = false + self.shape = "portrait" end -- Size of single block |