Advertisement
Guest User

Bag showing button

a guest
Feb 25th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. function OpenBags()
  2. if Bagnon:IsShown() then Bagnon:Hide(); else Bagnon:Show(); end
  3. end
  4. local button = CreateFrame("Button","OpenBagFrame", UIParent)
  5. button:SetFrameStrata("LOW")
  6. button:SetWidth(64)
  7. button:SetHeight(64)
  8. button:SetScale(0.25)
  9. local ntex = button:CreateTexture(OpenBagTexture, "LOW")
  10. ntex:SetTexture("Interface\\AddOns\\ButtonToggle\\Texture\\MC_trappedchest_icon.tga")
  11. ntex:SetAllPoints(button)
  12. button:SetNormalTexture(ntex)
  13. local htex = button:CreateTexture(SWKTMButtonTextureHighlight, "LOW")
  14. htex:SetTexture("Interface\\AddOns\\ButtonToggle\\Texture\\MC_trappedchest_iconHL.tga")
  15. htex:SetAllPoints(button)
  16. button:SetHighlightTexture(htex)
  17. local ptex = button:CreateTexture(SWKTMButtonTexturePushed, "LOW")
  18. ptex:SetTexture("Interface\\AddOns\\ButtonToggle\\Texture\\MC_trappedchest_icon.tga")
  19. ptex:SetAllPoints(button)
  20. button:SetPushedTexture(ptex)
  21. button:SetPoint("CENTER", UIParent, 500, 800)
  22. button:Show()
  23. button:SetScript("OnClick", function()
  24. OpenBags()
  25. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement