[tech]images/content inclusion
Seems I'm the first to post, I hope it does worth it.
I was wandering on the internet wondering if and how it would be possible to insert custom images, like a guild banner a start (even if it's not necessarily the world best add-on, I agree on that). Now that it's been posted I can continue my research in peace, i guess. Thanks in advance. |
I've tried to use a custom graphic myself and was so far unsuccessful...
|
Did you try with the function below ?
* SetTexture (string filename) If not, what did you try ? In any case, were you able to find out what was the problem ? A relative/absolute path misleading ? Permission problem ? Were did you put you image ? i'm sorry, but I'm curious and slightly enthousiastic. :p |
*edit*
See below. |
You can put DDS files alongside your addon, if you only :SetTexture("YourAddonFolder/file.dds") .
|
That simple. :)
|
I was trying with a file path that started at the EsoUI level, like it works in the default UI files. I will have to try again with starting the path at just the addon folder. Thanks. :)
|
Thanks a lot for your answers.
Last step is dealing with vertex objects I guess. |
I'm trying to load a dds file too.
Any problem to load a dds already in the client ("/esoui/art…") but impossible to load my dds. It's just a 32x32 png converted in dds with the photoshop plugin. I try different options (DXT, 8.8.8.8, etc…) but it's doesn't work. For the path I use something like : "MyAddonName/Img/Myfile.dds", with a Img folder in my addon. Do you have some dds file already working to share please ? |
I will give it a try.
*edit* I will upload my first addon in a second. It shows how to work with textures and controls. For a first view check: http://code.google.com/p/zork-esoui/...extureTest.lua When saving a DDS file choose DXT5 ARGB. Result: The green shield texture is the default one. The purple one I made myself. *edit 2* Addon is available here: http://www.esoui.com/downloads/info33-zTextureTest.html The simplest texture integration can be done via: lua Code:
|
Thanks for the code. :)
|
Does it absolutely need to be a DDS? I seem to have some conversion errors when converting from PNG to DDS.
|
Iirc, dds files have an alpha channel for opacity, which is required. PNG doesn't have that, although it can do transparencies, so should be easy to make.
|
Quote:
PNG32 does have an alpha channel. |
All times are GMT -6. The time now is 01:10 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI