View Single Post
05-31-10, 07:50 PM   #1
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
A fix? WorldMapBlobFrame taint issues.

I think i have come up with a fix for the infamous worldmapblobframe. Now the only problem with it is that when you leave combat it will automaticlly turn on quest tracking on the WorldMap. I always have mine on so to me this is not a big issue. I think somehow one could add a GetChecked to the begining and store a variable then use the variable to make the exiting combat function load your checked state accordingly. But for the most part this will fix any of the WorldMapBlobFrame issues when it comes to toggling the worldmap in combat for any reason via an addon.

lua Code:
  1. local GUIWorldMapEvents = CreateFrame("Frame", nil, UIParent)
  2. GUIWorldMapEvents:RegisterEvent("PLAYER_ENTERING_WORLD")
  3. GUIWorldMapEvents:RegisterEvent("PLAYER_REGEN_ENABLED")
  4. GUIWorldMapEvents:RegisterEvent("PLAYER_REGEN_DISABLED")
  5.  
  6. GUIWorldMapEvents:SetScript("OnEvent", function(self)
  7.     if event == "PLAYER_ENTERING_WORLD" then
  8.         ShowUIPanel(WorldMapFrame)
  9.         HideUIPanel(WorldMapFrame)
  10.    
  11.     elseif event == "PLAYER_REGEN_DISABLED" then
  12.         WatchFrame.showObjectives = nil;
  13.         WorldMapQuestShowObjectives:SetChecked(false)
  14.         WorldMapQuestShowObjectives:Hide()
  15.         WorldMapTrackQuest:Hide()
  16.         WorldMapTitleButton:Hide()
  17.         WorldMapFrameSizeUpButton:Hide()
  18.         WorldMapBlobFrame:Hide()
  19.         WorldMapPOIFrame:Hide()
  20.        
  21.         WorldMapFrameSizeUpButton.Show = GrimUI.Dummy
  22.         WorldMapQuestShowObjectives.Show = GrimUI.Dummy
  23.         WorldMapTrackQuest.Show = GrimUI.Dummy
  24.         WorldMapTitleButton.Show = GrimUI.Dummy
  25.         WorldMapBlobFrame.Show = GrimUI.Dummy
  26.         WorldMapPOIFrame.Show = GrimUI.Dummy
  27.        
  28.        
  29.         WatchFrame_Update();
  30.    
  31.     elseif event == "PLAYER_REGEN_ENABLED" then
  32.        
  33.         WorldMapFrameSizeUpButton.Show = WorldMapFrameSizeUpButton:Show()
  34.         WorldMapQuestShowObjectives.Show = WorldMapQuestShowObjectives:Show()
  35.         WorldMapTrackQuest.Show = WorldMapTrackQuest:Show()
  36.         WorldMapTitleButton.Show = WorldMapTitleButton:Show()
  37.         WorldMapBlobFrame.Show = WorldMapBlobFrame:Show()
  38.         WorldMapPOIFrame.Show = WorldMapPOIFrame:Show()
  39.        
  40.         WatchFrame.showObjectives = true;
  41.         WorldMapQuestShowObjectives:SetChecked(true)
  42.  
  43.         WorldMapQuestShowObjectives:Show()
  44.         WorldMapTrackQuest:Show()
  45.         WorldMapTitleButton:Show()
  46.         WorldMapFrameSizeUpButton:Show()
  47.         WorldMapBlobFrame:Show()
  48.         WorldMapPOIFrame:Show()
  49.        
  50.         WatchFrame_Update();
  51.     end
  52. end)
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote