View Single Post
03/01/14, 07:08 AM   #10
zork
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 29
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:
  1. --window manager
  2.       local wm = GetWindowManager()
  3.      
  4.       local c = wm:CreateTopLevelWindow(nil)
  5.       c:SetDimensions(128,128)
  6.       c:SetAnchor(CENTER,GuiRoot,CENTER,0,0)
  7.      
  8.       --texture referencing a local media folder
  9.       c.icon = wm:CreateControl(nil, c, CT_TEXTURE)
  10.       c.icon:SetTexture("zTextureTest/media/purple_shield.dds")
  11.       c.icon:SetAnchorFill(c)

Last edited by zork : 03/01/14 at 11:24 AM.
  Reply With Quote