View Single Post
11/02/14, 12:56 PM   #6
zireko
 
zireko's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 63
I got the image to pull up however I think there is a problem some where in the table or the local function QuestMaps()
Because I can go above and comment the code out and pull up the image. Right now I'm just getting a white box I have it un hidden so that I can see the img currently. Here is the code I have.

Lua Code:
  1. --This code displays the image with lua so no need for any xml.
  2.  
  3. local tlw = WINDOW_MANAGER:CreateTopLevelWindow("WindowName")
  4. tlw:SetDimensions(700,700)
  5. tlw:SetAnchor(CENTER)
  6. tlw:SetHidden(false)
  7.  
  8. local image = WINDOW_MANAGER:CreateControl("WindowNameImage", tlw, CT_TEXTURE)
  9. image:SetAnchorFill(tlw)
  10.  
  11. --WindowNameImage:SetTexture("QuestVisions/Maps/auridon.dds")
  12.  
  13. --[[This table is the zone index map and what I want it to display. Example [179] = 51, would be quest number to display. However
  14. instead of 51, we could place an image here.]]--
  15.  
  16. --Custom images must be in .dds format a picture program like photoshop or gimp should be able to convert the image.
  17. --To call an image it would be example "QuestVisions/Maps/auridon.dds" or [[QuestVisions/Maps/auridon.dds]].
  18. local questImage ={
  19. --Aldmeri Dominion
  20.     [179] = "QuestVisions/Maps/auridon.dds", --Auridon
  21.     [295] = 11, --Khenarthi's Roost
  22.     [181] = 44, --Grahtwood
  23.     [19]  = 50, --Greenshade
  24.     [12]  = 45, --Malabal Tor
  25.     [180] = 60, --Reaper's March
  26.  
  27. --Daggerfall Covenant
  28.     [293] = 15, --Stros M'Kai
  29.     [294] = 9,  --Betnikh
  30.     [2]   = 67, --Glenumbra
  31.     [4]   = 70, --Stormhaven
  32.     [5]   = 48, --Rivenspir
  33.     [18]  = 53, --Alik'r Desert
  34.     [15]  = 47, --Bangkorai
  35.  
  36. --Ebonheart Pact
  37.     [110] = 12, --Bleakrock Isle
  38.     [111] = 9,  --Bal Foyen
  39.     [9]   = 76, --Stonefalls
  40.     [11]  = 67, --Deshaan
  41.     [20]  = 64, --Shadowfen
  42.     [16]  = 52, --Eastmarch
  43.     [17]  = 73, --The Rift
  44.  
  45. --All other quest/other
  46.     [155] = 32, --Coldharbour
  47.     [353] = 18, --Craglorn
  48.     [38] = 566, --Cyrodiil
  49. }
  50.  
  51. --[[This function pulls up what I want displayed for each zone like in questlurker it uses the zone index map to find the zone then
  52. display the quest number I've provided. Instead of a quest number I can add an image.]]--
  53.  
  54. -- QuestMapsQuest:SetTexture is how we call the texture which is our image. MyBackdropElement:SetCenterTexture([[Maps/auridon.dds]])
  55.  
  56. local function QuestMaps()
  57.     local zoneIndex = GetCurrentMapZoneIndex()
  58.     local imgQuests = questImage[zoneIndex]
  59.     if imgQuests ~= nil then
  60.         WindowNameImage:SetTexture(imgQuests)
  61.         WindowName:SetHidden(false)
  62.     else
  63.         WindowName:SetHidden(true)
  64.     end
  65. end
  Reply With Quote