Sign in to follow this  

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

Status: Pending

This issue has not been confirmed by a developer yet.


  Report Bug
Sign in to follow this  


User Feedback


There are no comments to display.



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now