HideUIPanel(self:GetParent():GetParent());
TokenFramePopup:Hide();
_G[self:GetName().."Text"]:SetText(UNUSED);
_G[self:GetName().."Text"]:SetTextColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
if ( self:GetChecked() ) then
PlaySound("igMainMenuOptionCheckBoxOn");
SetCurrencyUnused(TokenFrame.selectedID, 1);
else
PlaySound("igMainMenuOptionCheckBoxOff");
SetCurrencyUnused(TokenFrame.selectedID, 0);
end
TokenFrame_Update();
TokenFramePopup_CloseIfHidden();
BackpackTokenFrame_Update();
ManageBackpackTokenFrame();
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
GameTooltip:SetText(TOKEN_MOVE_TO_UNUSED, nil, nil, nil, nil, 1);
_G[self:GetName().."Text"]:SetText(SHOW_ON_BACKPACK);
_G[self:GetName().."Text"]:SetTextColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
if ( self:GetChecked() ) then
if ( GetNumWatchedTokens() >= MAX_WATCHED_TOKENS ) then
UIErrorsFrame:AddMessage(format(TOO_MANY_WATCHED_TOKENS, MAX_WATCHED_TOKENS), 1.0, 0.1, 0.1, 1.0);
self:SetChecked(false);
return;
end
PlaySound("igMainMenuOptionCheckBoxOn");
SetCurrencyBackpack(TokenFrame.selectedID, 1);
else
PlaySound("igMainMenuOptionCheckBoxOff");
SetCurrencyBackpack(TokenFrame.selectedID, 0);
end
TokenFrame_Update();
BackpackTokenFrame_Update();
ManageBackpackTokenFrame();
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
GameTooltip:SetText(TOKEN_SHOW_ON_BACKPACK, nil, nil, nil, nil, 1);
local name = self:GetName();
self.icon = _G[name.."Icon"];
self.count = _G[name.."Count"];
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
if ( self.extraCurrencyType == 1 ) then
GameTooltip:SetText(ARENA_POINTS, HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
GameTooltip:AddLine(TOOLTIP_ARENA_POINTS, nil, nil, nil, 1);
GameTooltip:Show();
elseif ( self.extraCurrencyType == 2 ) then
GameTooltip:SetText(HONOR_POINTS, HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
GameTooltip:AddLine(TOOLTIP_HONOR_POINTS, nil, nil, nil, 1);
GameTooltip:Show();
else
GameTooltip:SetBackpackToken(self:GetID());
end
GameTooltip:Hide();
BackpackTokenButton_OnClick(self, button, down);