@@ -766,6 +766,7 @@ local function Object(name)
766766
767767 setSize = function (self , width , height )
768768 self .width , self .height = width , height
769+ eventSystem :sendEvent (" basalt_resize" , self )
769770 visualsChanged = true
770771 return self
771772 end ;
@@ -2060,15 +2061,15 @@ local function Label(name)
20602061 if (self .bgColor ~= false )then
20612062 self .parent :drawBackgroundBox (obx , oby , self .width , self .height , self .bgColor )
20622063 self .parent :drawTextBox (obx , oby , self .width , self .height , " " ) end
2063- if (self .bgColor ~= false )then self .parent :drawForegroundBox (obx , oby , self .width , self .height , self .fgColor ) end
2064+ if (self .fgColor ~= false )then self .parent :drawForegroundBox (obx , oby , self .width , self .height , self .fgColor ) end
20642065 if (fontsize == 0 )then
20652066 for n = 1 , self .height do
20662067 if (n == verticalAlign ) then
2067- self .parent :writeText (obx , oby + (n - 1 ), getTextHorizontalAlign (self :getValue (), self .width , textHorizontalAlign ), self . bgColor , self . fgColor )
2068+ self .parent :setText (obx , oby + (n - 1 ), getTextHorizontalAlign (self :getValue (), self .width , textHorizontalAlign ))
20682069 end
20692070 end
20702071 else
2071- local tData = makeText (fontsize , self :getValue (), self .fgColor , self .bgColor )
2072+ local tData = makeText (fontsize , self :getValue (), self .fgColor , self .bgColor or colors . black )
20722073 if (autoSize )then
20732074 self .height = # tData [1 ]- 1
20742075 self .width = # tData [1 ][1 ]
@@ -2082,7 +2083,7 @@ local function Label(name)
20822083
20832084 for i = 1 , cY do
20842085 self .parent :setFG (obx , oby + i + n - 2 , getTextHorizontalAlign (tData [2 ][i ], self .width , textHorizontalAlign ))
2085- self .parent :setBG (obx , oby + i + n - 2 , getTextHorizontalAlign (tData [3 ][i ], self .width , textHorizontalAlign , tHex [self .bgColor ]))
2086+ self .parent :setBG (obx , oby + i + n - 2 , getTextHorizontalAlign (tData [3 ][i ], self .width , textHorizontalAlign , tHex [self .bgColor or colors . black ]))
20862087 self .parent :setText (obx , oby + i + n - 2 , getTextHorizontalAlign (tData [1 ][i ], self .width , textHorizontalAlign ))
20872088 end
20882089 end
@@ -3194,7 +3195,7 @@ local function Progressbar(name)
31943195 end ;
31953196
31963197 progressDoneHandler = function (self )
3197- self :sendEvent (" progress_done" )
3198+ self :sendEvent (" progress_done" , self )
31983199 end ;
31993200
32003201 draw = function (self )
@@ -4290,6 +4291,7 @@ local function Frame(name, parent)
42904291 end
42914292 end
42924293 end
4294+ return self
42934295 end ;
42944296
42954297 setOffset = function (self , xO , yO )
0 commit comments