ItemAnim_OnLoad(self);
ItemAnim_OnEvent(self, event, ...);
ItemAnim_OnAnimFinished(self);
PaperDollItemSlotButton_OnLoad(self);
self:RegisterEvent("BAG_UPDATE");
self.isBag = 1;
self.UpdateTooltip = BagSlotButton_OnEnter;
_G[self:GetName().."NormalTexture"]:SetWidth(50);
_G[self:GetName().."NormalTexture"]:SetHeight(50);
_G[self:GetName().."Count"]:SetPoint("BOTTOMRIGHT", -2, 2);
self.maxDisplayCount = 999;
if ( event == "BAG_UPDATE" ) then
PaperDollItemSlotButton_Update(self);
else
PaperDollItemSlotButton_OnEvent(self, event, ...);
end
PaperDollItemSlotButton_OnShow(self);
PaperDollItemSlotButton_OnHide(self);
if ( IsModifiedClick() ) then
BagSlotButton_OnModifiedClick(self, button);
else
BagSlotButton_OnClick(self, button);
end
BagSlotButton_OnDrag(self, button);
BagSlotButton_OnClick(self);
BagSlotButton_OnEnter(self, motion);
GameTooltip:Hide();
ResetCursor();
self:RegisterForClicks("LeftButtonUp", "RightButtonUp");
MainMenuBarBackpackButtonIconTexture:SetTexture("Interface\\Buttons\\Button-Backpack-Up");
self:RegisterEvent("PLAYER_ENTERING_WORLD");
self:RegisterEvent("CVAR_UPDATE");
self:RegisterEvent("BAG_UPDATE");
if ( IsModifiedClick() ) then
BackpackButton_OnModifiedClick(self, button);
else
BackpackButton_OnClick(self, button);
end
GameTooltip:SetOwner(self, "ANCHOR_LEFT");
GameTooltip:SetText(BACKPACK_TOOLTIP, 1.0, 1.0, 1.0);
local keyBinding = GetBindingKey("TOGGLEBACKPACK");
if ( keyBinding ) then
GameTooltip:AppendText(" "..NORMAL_FONT_COLOR_CODE.."("..keyBinding..")"..FONT_COLOR_CODE_CLOSE);
end
GameTooltip:AddLine(string.format(NUM_FREE_SLOTS, (self.freeSlots or 0)));
GameTooltip:Show();
self:SetID(KEYRING_CONTAINER);
self:RegisterForClicks("LeftButtonUp", "RightButtonUp");
if (CursorHasItem()) then
PutKeyInKeyRing();
else
ToggleKeyRing();
end
if (CursorHasItem()) then
PutKeyInKeyRing();
end
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
GameTooltip:SetText(KEYRING, HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
GameTooltip:AddLine();