Quantcast WoWInterface - View Single Post - SecurePartyHeaderTemplate
View Single Post
03-05-15, 03:30 PM   #3
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,289
Thanks, i came up with a similar method, i'm just not sure how legit is this. I don't really have much experience with this secure stuff:

XML Code:
  1. <Frame name="ZPerl_Party_SecureState" inherits="SecureHandlerStateTemplate" parent="UIParent" protected="true">
  2.     <Attributes>
  3.         <Attribute name="_onstate-partymonitor" value="if newstate == 'nocombat' then elseif newstate == 'raid1' and self:GetAttribute('partyInRaid') then if not self:GetFrameRef('partyHeader'):IsShown() then self:GetFrameRef('partyHeader'):Show() end elseif newstate == 'party1' then if not self:GetFrameRef('partyHeader'):IsShown() then self:GetFrameRef('partyHeader'):Show() end else if self:GetFrameRef('partyHeader'):IsShown() then self:GetFrameRef('partyHeader'):Hide() end end"/>
  4.     </Attributes>
  5.     <Scripts>
  6.         <OnLoad>
  7.             SecureHandler_OnLoad(self)
  8.             self:SetFrameRef("partyHeader", ZPerl_Party_SecureHeader)
  9.             self:SetAttribute("partyInRaid", XPerlDB.party.inRaid)
  10.             RegisterStateDriver(self, "partymonitor", "[nocombat] nocombat; [target=raid1, exists] raid1; [target=party1, exists] party1; hide")
  11.         </OnLoad>
  12.     </Scripts>
  13. </Frame>
  Reply With Quote