Advertisement
alexdubovyck

Заказ 03.01.2016

Jan 2nd, 2016
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.87 KB | None | 0 0
  1. if not auctionfunc then
  2.  
  3. -- local aFrame = CreateFrame("Frame")
  4. local aFrame = CreateFrame("Button", nil, UIParent, "SecureActionButtonTemplate");
  5. aFrame:SetSize(40,40)
  6. aFrame:SetPoint("CENTER",0,-250)
  7.  
  8. aFrame:EnableMouse(true)
  9. aFrame:SetMovable(true)
  10. aFrame:RegisterForClicks("LeftButtonUp", "RightButtonUp")
  11. aFrame:SetScript("OnClick", function(self, button)
  12.     if button == "RightButton" then
  13.         print("Вы нажали ПКМ")
  14.     elseif button == "LeftButton" then
  15.         print("Вы нажали ЛКМ")
  16.     end
  17. end)
  18.  
  19. aFrame:SetScript("OnMouseDown", function(self)
  20.     if IsLeftControlKeyDown() == 1 then
  21.         self:StartMoving()
  22.     end
  23. end)
  24. aFrame:SetScript("OnMouseUp", function(self)
  25.     self:StopMovingOrSizing()
  26. end)
  27.  
  28. local bTexture = aFrame:CreateTexture()
  29. bTexture:SetAllPoints()
  30. bTexture:SetTexture("Interface\\Icons\\Spell_Nature_Rejuvenation")
  31.  
  32. auctionfunc = true end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement