FauxScrollFrame_OnVerticalScroll(self, offset, REPUTATIONFRAME_FACTIONHEIGHT, ReputationFrame_Update);
ReputationBar1:SetPoint("TOPRIGHT", ReputationFrame, "TOPRIGHT", -70, -83);
ReputationBar1:SetPoint("TOPRIGHT", ReputationFrame, "TOPRIGHT", -46, -83);
GameTooltip_AddNewbieTip(self, FACTION, 1.0, 1.0, 1.0, REPUTATION_FACTION_DESCRIPTION, 1);
GameTooltip_AddNewbieTip(self, STANDING, 1.0, 1.0, 1.0, REPUTATION_STANDING_DESCRIPTION, 1);
_G[self:GetName().."Text"]:SetText(AT_WAR);
_G[self:GetName().."Text"]:SetVertexColor(RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b);
FactionToggleAtWar(GetSelectedFaction());
if ( self:GetChecked() ) then
PlaySound("igMainMenuOptionCheckBoxOn");
else
PlaySound("igMainMenuOptionCheckBoxOff");
end
ReputationFrame_Update();
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
GameTooltip:SetText(REPUTATION_AT_WAR_DESCRIPTION, nil, nil, nil, nil, 1);
_G[self:GetName().."Text"]:SetText(MOVE_TO_INACTIVE);
if ( self:GetChecked() ) then
PlaySound("igMainMenuOptionCheckBoxOn");
SetFactionInactive(GetSelectedFaction());
else
PlaySound("igMainMenuOptionCheckBoxOff");
SetFactionActive(GetSelectedFaction());
end
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
GameTooltip:SetText(REPUTATION_MOVE_TO_INACTIVE, nil, nil, nil, nil, 1);
_G[self:GetName().."Text"]:SetText(SHOW_FACTION_ON_MAINSCREEN);
if ( self:GetChecked() ) then
PlaySound("igMainMenuOptionCheckBoxOn");
SetWatchedFactionIndex(GetSelectedFaction());
else
PlaySound("igMainMenuOptionCheckBoxOff");
SetWatchedFactionIndex(0);
end
ReputationWatchBar_Update();
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
GameTooltip:SetText(REPUTATION_SHOW_AS_XP, nil, nil, nil, nil, 1);
self:RegisterEvent("UPDATE_FACTION");
self:RegisterEvent("PLAYER_LEVEL_UP");
self:RegisterEvent("ENABLE_XP_GAIN");
self:RegisterEvent("DISABLE_XP_GAIN");
self:RegisterEvent("CVAR_UPDATE");
local arg1, arg2 = ...;
if( event == "UPDATE_FACTION" ) then
if ( self:IsShown() ) then
ReputationFrame_Update();
end
ReputationWatchBar_Update();
elseif( event == "PLAYER_LEVEL_UP" or event == "ENABLE_XP_GAIN" or event == "DISABLE_XP_GAIN" ) then
ReputationWatchBar_Update(arg1);
elseif( event == "CVAR_UPDATE" and arg1 == "XP_BAR_TEXT" ) then
if( arg2 == "1" ) then
ShowWatchedReputationBarText("lock");
else
HideWatchedReputationBarText("unlock");
end
end
if ( GetCVar("xpBarText") == "1" ) then
ShowWatchedReputationBarText("lock");
end
UIParent_ManageFramePositions();
ReputationWatchStatusBarText:Show();
if(not ReputationWatchBar.textLocked) then
ReputationWatchStatusBarText:Hide();
end