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:
@@ -35,9 +35,11 @@ local function Button(name)
|
||||
local obx, oby = self:getAnchorPosition()
|
||||
local verticalAlign = getTextVerticalAlign(self.height, textVerticalAlign)
|
||||
|
||||
self.parent:drawBackgroundBox(obx, oby, self.width, self.height, self.bgColor)
|
||||
self.parent:drawForegroundBox(obx, oby, self.width, self.height, self.fgColor)
|
||||
self.parent:drawTextBox(obx, oby, self.width, self.height, " ")
|
||||
if(self.bgColor~=false)then
|
||||
self.parent:drawBackgroundBox(obx, oby, self.width, self.height, self.bgColor)
|
||||
self.parent:drawTextBox(obx, oby, self.width, self.height, " ")
|
||||
end
|
||||
if(self.fgColor~=false)then self.parent:drawForegroundBox(obx, oby, self.width, self.height, self.fgColor) end
|
||||
for n = 1, self.height do
|
||||
if (n == verticalAlign) then
|
||||
self.parent:setText(obx, oby + (n - 1), getTextHorizontalAlign(self:getValue(), self.width, textHorizontalAlign))
|
||||
|
||||
Reference in New Issue
Block a user