[ui] Fix device require() path.

This commit is contained in:
Lorenzo Cogotti 2022-08-16 09:49:37 +02:00
parent e70537142e
commit dd255e19ac
1 changed files with 2 additions and 2 deletions

4
ui.lua
View File

@ -1,4 +1,4 @@
local BASE = (...):gsub('ui', '')
local BASE = (...):gsub('ui$', '')
local Widget = require(BASE..'widget')
local Layout = require(BASE..'layout')
@ -72,7 +72,7 @@ function Ui.new(args)
local self = setmetatable(args, Ui)
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.y = self.y or 0
self.pointerActive = true