View Single Post
11/01/14, 09:33 PM   #3
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
As Merlight said, you will need to convert image to DDS first: http://www.esoui.com/forums/showthread.php?t=127

If you want to display image, you will need to create control which can display it - the easiest is using texture control.

Simple example in XML:
Lua Code:
  1. <GuiXml>
  2.     <Controls>
  3.         <TopLevelControl name="WindowName" hidden="true">
  4.             <Dimensions x="256" y="256">
  5.             <Anchor point="CENTER">
  6.             <Controls>
  7.                 <Texture name="$(parent)Image">
  8.                     <AnchorFill />
  9.                 </Texture>
  10.             </Controls>
  11.         </TopLevelControl>
  12.     </Controls>
  13. </GuiXml>

The same as above in Lua:
Lua Code:
  1. local tlw = WINDOW_MANAGER:CreateTopLevelWindow("WindowName")
  2. tlw:SetDimensions(256,256)
  3. tlw:SetAnchor(CENTER)
  4. tlw:SetHidden(true)
  5.  
  6. local image = WINDOW_MANAGER:CreateControl("WindowNameImage", tlw, CT_TEXTURE)
  7. image:SetAnchorFill(tlw)

Now just check if you image path exists and if so display it:
Lua Code:
  1. local function QuestMaps()
  2.     local zoneIndex = GetCurrentMapZoneIndex()
  3.     local imgQuests = questImage[zoneIndex]
  4.     if imgQuests ~= nil then
  5.         WindowNameImage:SetTexture(imgQuests)
  6.         WindowName:SetHidden(false)
  7.     else
  8.         WindowName:SetHidden(true)
  9.     end
  10. end

(untested, but I think you have an idea what I mean)
  Reply With Quote