Quantcast How to display an icon ? - ESOUI
Thread Tools Display Modes
03/14/15, 09:51 AM   #1
Skyndia
Join Date: Mar 2015
Posts: 2
Question 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 !
  Reply With Quote
03/14/15, 10:42 AM   #2
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 499
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
Originally Posted by Skyndia View Post
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 !
__________________
@votan73 (EU - megaserver)
  Reply With Quote
03/14/15, 11:07 AM   #3
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,022
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.
__________________
Obsessive Compulsive Coder

My little french Guild: Cercle de l'Eveil
  Reply With Quote
03/14/15, 11:23 AM   #4
Skyndia
Join Date: Mar 2015
Posts: 2
Thank you both, now I can work on this
  Reply With Quote
03/14/15, 04:48 PM   #5
Nolan Kotulan
 
Nolan Kotulan's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2014
Posts: 17
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.
__________________

Age of Wonders III mods
  Reply With Quote
03/15/15, 04:18 AM   #6
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 648
You can use this to view textures. It does not have every texture, but it has over 3400.
You can find it here: TextureIt
__________________
My Addons: JunkIt, FilterIt, WaypointIt, LootIt, TweakIt, ChatIt, SortIt
My Libs & Other Developer Stuff: Click4Info, LibNeed4Research, LibMsgWin, LibFilterIt, LibItemInfo
Other Files & Works In Progress can be found on my Dropbox: ESO Dropbox
  Reply With Quote

ESOUI » Developer Discussions » Graphics Help » How to display an icon ?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off