Thread Tools Display Modes
03/02/16, 05:49 AM   #1
SiSaSyco
AddOn Author - Click to view addons
Join Date: Nov 2014
Posts: 8
Floating text with image

Hi!

Is it possible to have floating text with icons?

Example display in game:

Some title or other text
name1 [D], name2 [H], name3 [T], name4 [D], ...


[T] should be icon for tank, [H] healer and [D] damage dealer

I know how to place controls with texture/icon in ui but i dont know if i can do it without positioning it absolute with x & y coordinates but in text flow?
  Reply With Quote
03/02/16, 06:16 AM   #2
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
to display an image in text, use

Lua Code:
  1. |t:x:y:path|t

x is x dimension, y is y dimension, path is a path of your image. can be added by your addon.

ex :

Lua Code:
  1. |t16:16:EsoUI/Art/ChatWindow/csIcon.dds|t
  2. |t16:16:MyAddon/picts/mypict.dds|t

core textures are listed on http://wiki.esoui.com/Texture_List
to create a dds file, use Paint.net

Last edited by Ayantir : 03/02/16 at 06:19 AM.
  Reply With Quote
03/02/16, 07:12 AM   #3
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
There are also a few other things you can do inside text. Just take a look at this wiki page.
In case you plan to create your own textures, keep in mind that they won't show up in the game until you have restarted it when you first create the file. Updates to an existing files are shown after you reload the UI.
And also make sure that the dimensions of the texture are a power of 2. Otherwise it cannot be loaded.
  Reply With Quote
03/02/16, 07:55 AM   #4
SiSaSyco
AddOn Author - Click to view addons
Join Date: Nov 2014
Posts: 8
Excellent! That's exactly what I was looking for! Thank you very much!
  Reply With Quote
03/02/16, 09:24 AM   #5
@AlphaLemming
 
@AlphaLemming's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 122
Another way to reach your goal (and possible with nicer look) is to create your controls with text and textures and then animate them with ANIMATION_TRANSLATE and ANIMATION_ALPHA.
Look here: Animation
  Reply With Quote
03/04/16, 06:27 AM   #6
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,966
Is there any difference to your described "manually" text formatting and the function here:
Lua Code:
  1. local myText = zo_iconTextFormat(texturePath, width, height, myText)
  Reply With Quote
03/04/16, 06:50 AM   #7
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
There is no difference. The function is just placing the parameters into a template string for you. The result is the same.
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Floating text with image


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