ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Graphics Help (https://www.esoui.com/forums/forumdisplay.php?f=176)
-   -   Any way to know a game texture's dimension? (https://www.esoui.com/forums/showthread.php?t=1393)

ZunaSW 05/06/14 10:52 AM

Any way to know a game texture's dimension?
 
Hi! Sorry my english.
I wanted to know if there is a way to know the dimensions of one of the textures in the game, especially the ones of the UI. I know there is a list of the textures in the game and I thank it, it helped me a lot, but it doesn't say the dimensions of them.
Can I get the dimensions with the Zgoo addon? Or is there another way to get them?
Thank you!

Garkin 05/06/14 04:22 PM

Quote:

Originally Posted by ZunaSW (Post 7055)
Hi! Sorry my english.
I wanted to know if there is a way to know the dimensions of one of the textures in the game, especially the ones of the UI. I know there is a list of the textures in the game and I thank it, it helped me a lot, but it doesn't say the dimensions of them.
Can I get the dimensions with the Zgoo addon? Or is there another way to get them?
Thank you!

Usually it is just textureControl:GetDimensions(), but if you do not know exact name, its better to use Zgoo.
Move mouse cursor over the object you want to inspect and type /zgoo mouse. It will show you all available methods for that object. Find GetDimensions() and click on ":" next to it. It will show you width and height of that object.

Seerah 05/06/14 06:31 PM

That would give you the dimensions of the control, not the actual texture file that the control is displaying. afaik, there is no such way.

Stormknight 05/06/14 06:43 PM

Which textures specifically do you want to know? I have converted a bunch of them to PNG files so I know these ones.

ZunaSW 05/07/14 06:23 AM

Oh, Zgoo helped me, but it says 1985 (a lot of numbers here), 1488 (a lot of numbers here), I think that is not the dimension of the texture, because I think it is not a valid dimension for a dds file, or I am wrong? :confused:

I wanted to know the dimensions of the health, stamina and magicka frames (I know there are three frames, center, left and right) textures. Also the compass three frames too (center, left and right). If I'm not wrong, each frame has a different texture.

Thank you!

EDIT: I'm watching the icons in the Image Viewer of Wykkyd Framework, I give you the .dds path of those I think the texture I'm looking for, but maybe they are not all of them, I can't find the diferent frames.

- /esoui/art/unitattributevisualizer/attributebar_small_frame.dds
- /esoui/art/unitframes/target_health_frame.dds

Iyanga 05/07/14 08:56 AM

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.

ZunaSW 05/07/14 09:43 AM

Quote:

Originally Posted by Iyanga (Post 7123)
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!

Iyanga 05/07/14 10:22 AM

Quote:

Originally Posted by ZunaSW (Post 7131)
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.

ZunaSW 05/07/14 10:59 AM

Hmm... I'm getting this error:

Code:

user:/AddOns/TestAddon/TestAddon.lua:32: attempt to index a nil value
stack traceback:
        user:/AddOns/TestAddon/TestAddon.lua:32: in function '(main chunk)'

Here is the part of the lua where you can find the line 32:

Code:

Tex01 = wm:CreateControl(TOP, Tex01, CT_TEXTURE)
Tex01:SetDimensions(1,1)
Tex01:SetResizeToFitFile(true)
Tex01:SetResizeToFitDescendents(true)
Tex01:SetTexture("TestAddon/tex/Tex01.dds")

I changed the "nil" of the other code to "TOP".

Any ideas? Thank you, you all are helping me a lot.

Seerah 05/07/14 12:49 PM

Change it back to nil. That's supposed to be the global name/reference you give to the frame you are creating. If you give it no name, you use nil. TOP is already a constant in ESO - it's a number that is used for anchoring and placement.

ZunaSW 05/07/14 12:51 PM

It's still giving me the error :/

Stormknight 05/07/14 12:54 PM

- /esoui/art/unitattributevisualizer/attributebar_small_frame.dds
256x64


- /esoui/art/unitframes/target_health_frame.dds
256x16

ZunaSW 05/07/14 01:00 PM

Quote:

Originally Posted by Stormknight (Post 7147)
- /esoui/art/unitattributevisualizer/attributebar_small_frame.dds
256x64


- /esoui/art/unitframes/target_health_frame.dds
256x16

OMG! Thank you! What about the compass one? "/esoui/art/compass/compass.dds". It's awesome, I don't know how did you extracted the files to get the dimensions o_O /applaud

Stormknight 05/07/14 01:26 PM

/esoui/art/compass/compass.dds
64x64


Here's galleries for the folders containing those images (has the other associated images):
/compass
/unitframes
/unitattributevisualizer

As far as how I got them, I used google to find an old (from beta) dump of the DDS files and then batch converted them to PNG files using GIMP.

There's also a list of textures on the Wiki that is similarly from the beta (that list is actually taken from Wykyyd's framework).

I'm hoping it's not too long before ZO officially release things and we can get an up-to-date version of this, as there are many textures that aren't on that list.

ZunaSW 05/07/14 01:32 PM

Wow... This is so awesome. Thank you Stormknight! And thank you all those who helped me :D I learned a lot!

Roupine 05/11/14 09:04 AM

If you create a CT_TEXTURE control using the file you're curious about, couldn't you then just use GetTextureFileDimensions() or GetTextureInfo()?


All times are GMT -6. The time now is 03:14 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI