View Single Post
03-19-20, 12:31 PM   #10
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,871
Doing it the proper (Seerah) way it would be:

Code:
if not CommunitiesFrame or not CommunitiesFrame:IsShown() then 
	ToggleGuildFrame() 
end 
CommunitiesFrame:SetDisplayMode(COMMUNITIES_FRAME_DISPLAY_MODES.ROSTER)
Although they both end up doing the same thing, my way adds 2 additional function calls (GetScript and the OnClick call).

XML for the roster tab:
Code:
<CheckButton name="CommunitiesRosterTabTemplate" hidden="true" inherits="CommunitiesFrameTabTemplate" virtual="true">
	<KeyValues>
		<KeyValue key="tooltip" value="COMMUNITIES_ROSTER_TAB_TOOLTIP" type="global"/>
	</KeyValues>
	<Scripts>
		<OnLoad>
			self.Icon:SetTexture("Interface\\Icons\\achievement_guildperk_everybodysfriend");
		</OnLoad>
		<OnClick inherit="append">
			self:GetParent():SetDisplayMode(COMMUNITIES_FRAME_DISPLAY_MODES.ROSTER);
		</OnClick>
	</Scripts>
</CheckButton>
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 03-19-20 at 12:52 PM.
  Reply With Quote