View Single Post
05/07/14, 09:43 AM   #7
ZunaSW
Join Date: Mar 2014
Posts: 37
Originally Posted by Iyanga View Post
It should be kinda easy to solve this.

Make a Control with a Texture Control within.
Set the Dimensions to 1x1.
Set SetResizeToFitFile and SetResizeToFitDescendents to true, load the texture and get the new dimensions.
Hmm... Its a good idea, but, how can I set the file which will be the texture resized? What I want to say is: we say to the texture to be resized to fit a file, but, what file? I have this in my lua:

Code:
Tex01 = wm:CreateControl(nil, Tex01, CT_TEXTURE)
Tex01:SetTexture("TestAddon/tex/Tex01.dds")
Tex01:SetDimensions(1,1)
Tex01:SetResizeToFitFile(true)
Tex01:SetResizeToFitDescendents(true)
Is it ok?
I created the control, and say what texture will have Tex01. I set the dimensions as you said, and then set resize to fit file and set resize to fit descendents. But Tex01 will have to know what file is that one so Tex01 can be resized at the size of that file, right? (wow.. I don't know if you understand what I want to say xD)

Thanks!
  Reply With Quote