Jump to content

scripts/widgets/text.lua defines SetSize twice


rezecib
  • Version: PC/MAC/Linux Pending
function Text:SetSize(sz)
	if LOC then
		sz = sz * LOC.GetTextScale()
	end
    self.inst.TextWidget:SetSize(sz)
    self.size = sz
end

function Text:SetSize(sz)
	return self.size
end

I assume the second entry was intended to get GetSize.

It also seems a bit problematic that self.size stores the inflated size, so if one were to store sometextwidget.size and use it to set it later, it would cause compounding of the LOC.GetTextScale() multiplier.


Steps to Reproduce
Open scripts/widgets/text.lua



User Feedback


There are no comments to display.


×
  • Create New...