Quantcast
WoWInterface - View Single Post - Error on Move Frame Addon
View Single Post
01-30-20, 03:17 AM   #10
BloodDragon
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Mar 2017
Posts: 18
I Have test this one:
Lua Code:
  1. local EventFrame = CreateFrame('Frame', nil, UIParent)
  2.     EventFrame:RegisterEvent('ADDON_LOADED')
  3.      
  4.     EventFrame:SetScript('OnEvent', function(self, event)
  5.         if event == 'Blizzard_AzeriteEssenceUI' then
  6.             --AzeriteEssenceUI
  7.             local MAEU = AzeriteEssenceUI
  8.             MAEU.ClearAllPoints = function() end
  9.             MAEU:SetPoint("TOPRIGHT", MinimapCluster, "BOTTOM", 45, -5)
  10.             MAEU.SetPoint = function() end
  11.             MAEU:SetMovable(true)
  12.             MAEU:SetUserPlaced(true)
  13.             MAEU:SetClampedToScreen(true)
  14.              
  15.             local MoveAzeriteEssenceUI = CreateFrame("Frame", nil, MAEU)  
  16.             MoveAzeriteEssenceUI:SetHeight(15)
  17.             MoveAzeriteEssenceUI:ClearAllPoints()
  18.             MoveAzeriteEssenceUI:SetPoint("TOPLEFT", MAEU)
  19.             MoveAzeriteEssenceUI:SetPoint("TOPRIGHT", MAEU)
  20.             MoveAzeriteEssenceUI:EnableMouse(true)
  21.             MoveAzeriteEssenceUI:SetHitRectInsets(-5, -5, -5, -5)
  22.             MoveAzeriteEssenceUI:RegisterForDrag("LeftButton")
  23.             MoveAzeriteEssenceUI:SetScript("OnDragStart", function(self, button)
  24.                 if button=="LeftButton" and IsModifiedClick()then
  25.                     MAEU:StartMoving()
  26.                 end
  27.             end)
  28.             MoveAzeriteEssenceUI:SetScript("OnDragStop", function(self, button)
  29.                 MAEU:StopMovingOrSizing()
  30.             end)
  31.             --AzeriteEssenceUI
  32.         end
  33.     end)

There was no Error . This is the full code.
  Reply With Quote