1
0
mirror of https://github.com/kepler155c/opus synced 2025-10-16 16:27:39 +00:00
This commit is contained in:
kepler155c@gmail.com
2019-02-27 08:10:09 -05:00
parent cc1a2bfbf4
commit 4dc6062043
3 changed files with 14 additions and 13 deletions

View File

@@ -263,7 +263,6 @@ function Manager:click(target, code, button, x, y)
if clickEvent.element.focus then
target:setFocus(clickEvent.element)
end
_G._p = clickEvent
self:inputEvent(clickEvent.element, clickEvent)
target:sync()

View File

@@ -16,5 +16,10 @@ function UI.Text:setParent()
end
function UI.Text:draw()
self:write(1, 1, Util.widthify(self.value or '', self.width), self.backgroundColor)
if self.align and self.align == 'center' then
self:clear()
self:centeredWrite(1, self.value or '')
else
self:write(1, 1, Util.widthify(self.value or '', self.width))
end
end