View Single Post
05/07/14, 10:22 AM   #8
Iyanga
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 183
Originally Posted by ZunaSW View Post
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!
The file is the texture file and the order is probably wrong. First you set the dimensions to 1,1. Then you enable the resizing and finally you set the texture.
  Reply With Quote