Some changes

-reworked monitor support
-fixed small draw bugs
-changed focus behaviour
-added some events
-fixed offset bug
-added border
-added shadow
-reworkd anchor system
-added possibility to remove background by setting the value to false
This commit is contained in:
Robert Jelic
2022-06-24 19:33:37 +02:00
parent 94cb23fd58
commit df4ad896b2
20 changed files with 745 additions and 201 deletions

View File

@@ -78,7 +78,7 @@ local function Input(name)
local obx, oby = self:getAnchorPosition()
showingText = ""
if (self.parent ~= nil) then
self.parent:setCursor(true, obx + textX - wIndex, oby, self.fgColor)
self.parent:setCursor(true, obx + textX - wIndex, oby+math.floor(self.height/2), self.fgColor)
end
end
end;
@@ -181,7 +181,7 @@ local function Input(name)
cursorX = self.x + self.width - 1
end
if (self.parent ~= nil) then
self.parent:setCursor(true, obx + cursorX, oby, self.fgColor)
self.parent:setCursor(true, obx + cursorX, oby+math.floor(self.height/2), self.fgColor)
end
internalValueChange = false
end
@@ -203,7 +203,7 @@ local function Input(name)
local obx, oby = self:getAnchorPosition()
local verticalAlign = getTextVerticalAlign(self.height, "center")
self.parent:drawBackgroundBox(obx, oby, self.width, self.height, self.bgColor)
if(self.bgColor~=false)then self.parent:drawBackgroundBox(obx, oby, self.width, self.height, self.bgColor) end
for n = 1, self.height do
if (n == verticalAlign) then
local val = tostring(base.getValue())