Thread Tools Display Modes
02-21-10, 01:37 PM   #1
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
secure show hide and when...

Having issues with secure handling, i got things to work so far as far as hiding the raid frames based on the blizz options and it being done securely so there is no taint. A few issues though... when you zone the party frames show up again, and when the frames are hidden and you leave a raid they stay hidden until i /reload. Im sure something can be added to what i have fix this.. here is what i have... anyone have any ideas?

lua Code:
  1. local RaidPartyHandler = CreateFrame("Frame", "RaidPartyHandler", UIParent, "SecureHandlerStateTemplate");
  2. SecureHandler_OnLoad(RaidPartyHandler);
  3. GrimUI.RaidPartyHandler = RaidPartyHandler
  4.  
  5. GrimPartyMain = CreateFrame("Frame", nil, RaidPartyHandler);
  6. GrimUI.GrimPartyMain = GrimPartyMain
  7.  
  8.  
  9. RaidPartyHandler:SetFrameRef("GrimPartyMain", GrimPartyMain);
  10.  
  11. RaidPartyHandler:Execute([[
  12. GrimPartyMain = self:GetFrameRef("GrimPartyMain");
  13. ]]);
  14.  
  15. RaidPartyHandler:Execute("raidhideparty = " .. tostring(GetCVar("hidePartyInRaid"))); -- hook to Blizzard option for party raid hide frames
  16.  
  17.  
  18. RaidPartyHandler:SetAttribute("_onstate-unitexists", [[
  19.     if raidhideparty == 1 and newstate then
  20.     GrimPartyMain:Hide()
  21.     end
  22.     if raidhideparty ~= 1 and newstate then
  23.     GrimPartyMain:Show()
  24.     end
  25. ]]);
  26.  
  27. RaidPartyHandler:SetAttribute("unit", "raid1");
  28. RegisterUnitWatch(RaidPartyHandler, true);
  29.  
  30.  
  31.  
  32. RaidPartyHandler:SetAttribute("state-unitexists", UnitExists("raid1"));
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » secure show hide and when...


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off