ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Graphics Help (https://www.esoui.com/forums/forumdisplay.php?f=176)
-   -   How to display an icon ? (https://www.esoui.com/forums/showthread.php?t=4432)

Skyndia 03/14/15 09:51 AM

How to display an icon ?
 
Hello !
I am a begginer in addon building.
I found a tutorial for text or frame but I didnt find anything about icon.
I think I can use this http://wiki.esoui.com/Texture_List but it is all I found for help me :/

Can someone help me ?
Thanks !

votan 03/14/15 10:42 AM

Hi Skyndia,

there are two ways showing icons.
  1. Using a "Texture" control and control:SetTexture(path)
  2. Inline text (for all controls showing text)
    In this case the text inline part needs a special format "|twidth:height:path|t"
    The zo_iconFormat(path, width, height) would create such a string for you.

All you need is to know a valid path. But the WIKI list is a bit out-dated.
One way to find those paths is to scan the LUA scripts of the game for strings starting with "esoui/art/".
Look here: http://www.esoui.com/forums/showpost...2&postcount=56

For you own DDS files the path is "OurAddonFolder/OurOptionalSubPath/OurImage.dds"
It must be DDS (paint.net and gimp can save that format)
The image width and height must match 2^n (2,4,8,16,32,64,....)

I guess our masters can tell you more.

CU
Quote:

Originally Posted by Skyndia (Post 19656)
Hello !
I am a begginer in addon building.
I found a tutorial for text or frame but I didnt find anything about icon.
I think I can use this http://wiki.esoui.com/Texture_List but it is all I found for help me :/

Can someone help me ?
Thanks !


Ayantir 03/14/15 11:07 AM

You can also use xml declaration as below :

Lua Code:
  1. <Texture name="TextureName" textureFile="EsoUI/Art/Miscellaneous/horizontalDivider.dds">
  2.     <Dimensions y="4"/>
  3.     <Anchor point="TOPLEFT" offsetY="370" offsetX="120" />
  4.     <Anchor point="TOPRIGHT" offsetY="370" offsetX="-120"/>
  5.     <TextureCoords top="0" bottom="1" left="0.181640625" right="0.818359375"/>
  6. </Texture>

It's a detailled and complex display, but you can only use

Lua Code:
  1. <Texture name="TextureName" textureFile="EsoUI/Art/Miscellaneous/horizontalDivider.dds" />

per exemple.

I'll update the wiki with all 1.6 stuff this weekend, not in the mood to code.

Skyndia 03/14/15 11:23 AM

Thank you both, now I can work on this :)

Nolan Kotulan 03/14/15 04:48 PM

You also can use Photoshop to open, edit and save DDS files by using the official NVIDIA Texture Tools.
And note that even if it isn't mentioned, it also works with Photoshop CC 2014.

circonian 03/15/15 04:18 AM

You can use this to view textures. It does not have every texture, but it has over 3400.
You can find it here: TextureIt


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

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