TargetUnit(self:GetAttribute("name"), true);
self.text = _G[self:GetName() .. "Text"]; self.button = _G[self:GetName() .. "SecureButton"];
self:SetAlpha(1.0);
if ( not self.show ) then self:SetAlpha(0); end
VoiceChatButton_OnEvent(self, event, ...);
self:SetBackdropBorderColor(0.5, 0.5, 0.5, 0.5); self:SetBackdropColor(TOOLTIP_DEFAULT_BACKGROUND_COLOR.r, TOOLTIP_DEFAULT_BACKGROUND_COLOR.g, TOOLTIP_DEFAULT_BACKGROUND_COLOR.b, 0.5); VoiceChatTalkers_OnLoad(self);
self:SetAlpha(1.0); self.mouseoverLock = true;
if ( self:IsMouseOver() ) then return; end

self.mouseoverLock = nil;

if ( VoiceChatTalkers_CanHide() ) then self:SetAlpha(0); end
MOVING_FRAME = self; self:SetFrameStrata("DIALOG"); self:StartMoving(); self.moving = true; UIParent_ManageFramePositions();
self:StopMovingOrSizing(); self:SetFrameStrata("DIALOG"); ValidateFramePosition(self, 25); self.moving = false; MOVING_FRAME = nil;
self:RegisterForClicks("LeftButtonUp", "RightButtonUp"); self:SetFrameLevel(self:GetFrameLevel()+1); self:RegisterEvent("VOICE_SESSIONS_UPDATE"); self:RegisterEvent("PLAYER_ENTERING_WORLD"); self:RegisterEvent("VOICE_SELF_MUTE");
MiniMapVoiceChatFrameBackground:SetAlpha(0.6);
if ( event == "VOICE_SESSIONS_UPDATE" or event == "PLAYER_ENTERING_WORLD" ) then MiniMapVoiceChat_Update(); UIDropDownMenu_Initialize(MiniMapVoiceChatDropDown, MiniMapVoiceChatDropDown_Initialize, "MENU"); end SetSelfMuteState();
if ( button == "LeftButton" ) then ToggleFriendsFrame(4); elseif ( button == "RightButton" ) then if ( self.count and self.count > 0 ) then ToggleDropDownMenu(1, nil, MiniMapVoiceChatDropDown, "MiniMapVoiceChatFrame", 0, -5); else ToggleFriendsFrame(4); end end
local text = VOICE_CHAT; if ( (GetCVar("VoiceChatSelfMute") == "1") and (GetCVar("VoiceChatMode") == "1")) then text = VOICE_CHAT.." "..SELFMUTED; end GameTooltip_AddNewbieTip(self, text, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_VOICE_CHAT_SELECTOR);