[ui] Fix device require() path.
This commit is contained in:
parent
e70537142e
commit
dd255e19ac
4
ui.lua
4
ui.lua
|
@ -1,4 +1,4 @@
|
||||||
local BASE = (...):gsub('ui', '')
|
local BASE = (...):gsub('ui$', '')
|
||||||
|
|
||||||
local Widget = require(BASE..'widget')
|
local Widget = require(BASE..'widget')
|
||||||
local Layout = require(BASE..'layout')
|
local Layout = require(BASE..'layout')
|
||||||
|
@ -72,7 +72,7 @@ function Ui.new(args)
|
||||||
local self = setmetatable(args, Ui)
|
local self = setmetatable(args, Ui)
|
||||||
assert(#self == 1, "Ui.new() must have exactly one root widget.")
|
assert(#self == 1, "Ui.new() must have exactly one root widget.")
|
||||||
|
|
||||||
self.device = self.device or require('device.love').new()
|
self.device = self.device or require(BASE..'device.love').new()
|
||||||
self.x = self.x or 0
|
self.x = self.x or 0
|
||||||
self.y = self.y or 0
|
self.y = self.y or 0
|
||||||
self.pointerActive = true
|
self.pointerActive = true
|
||||||
|
|
Loading…
Reference in New Issue