use class() in more places
This commit is contained in:
@@ -13,7 +13,7 @@ local function backspace(text)
|
||||
return ""
|
||||
end
|
||||
|
||||
Prompt = {
|
||||
Prompt = class(nil, {
|
||||
-- defaults for instance variables
|
||||
pos = { x = 10, y = 10 },
|
||||
input = "",
|
||||
@@ -23,7 +23,7 @@ Prompt = {
|
||||
color = {1,1,1,1},
|
||||
background_color = {0,0,0,1},
|
||||
active_prompt = nil,
|
||||
}
|
||||
})
|
||||
function Prompt:cancelActive()
|
||||
if Prompt.active_prompt then
|
||||
Prompt.active_prompt.canceled = true
|
||||
@@ -33,7 +33,6 @@ end
|
||||
function Prompt:new(o)
|
||||
o = o or {}
|
||||
setmetatable(o, self)
|
||||
self.__index = self
|
||||
return o
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user