ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   Floating text with image (https://www.esoui.com/forums/showthread.php?t=6134)

SiSaSyco 03/02/16 05:49 AM

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?

Ayantir 03/02/16 06:16 AM

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

sirinsidiator 03/02/16 07:12 AM

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.

SiSaSyco 03/02/16 07:55 AM

Excellent! That's exactly what I was looking for! Thank you very much!

@AlphaLemming 03/02/16 09:24 AM

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

Baertram 03/04/16 06:27 AM

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)

sirinsidiator 03/04/16 06:50 AM

There is no difference. The function is just placing the parameters into a template string for you. The result is the same.


All times are GMT -6. The time now is 09:35 AM.

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