Thread Tools Display Modes
01-30-20, 11:26 AM   #1
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,898
Something like:

Lua Code:
  1. local EventFrame = CreateFrame("Frame", "BloodDragonAzMover", UIParent)
  2. EventFrame:Hide()
  3. EventFrame:SetSize(50, 15)
  4. EventFrame:SetFrameStrata("HIGH")
  5. EventFrame:SetPoint("TOPLEFT", 20, -100)
  6. EventFrame:SetMovable(true)
  7. EventFrame:SetClampedToScreen(true)
  8. EventFrame:EnableMouse(true)
  9. EventFrame:SetHitRectInsets(-5, -5, -5, -5)
  10. EventFrame:RegisterForDrag("LeftButton")
  11. EventFrame:SetUserPlaced(true)
  12. EventFrame:SetScript("OnDragStart", function(self, button)
  13.     if button=="LeftButton" and IsModifiedClick()then
  14.         self:StartMoving()
  15.     end
  16. end)
  17. EventFrame:SetScript("OnDragStop", function(self, button)
  18.     self:StopMovingOrSizing()
  19. end)
  20. EventFrame:SetScript('OnEvent', function(self, event, name)
  21.     if name == 'Blizzard_AzeriteEssenceUI' then
  22.         self:UnregisterAllEvents()
  23.         local MAEU = AzeriteEssenceUI
  24.         self:SetParent(MAEU)
  25.         self:SetSize(MAEU:GetWidth()-50, 15) -- -50 to not block the close button
  26.         MAEU:ClearAllPoints()
  27.         MAEU:SetPoint("TOP", self)
  28.         MAEU.ClearAllPoints = function() end
  29.         MAEU.SetPoint = function() end
  30.         self:Show()
  31.     end
  32. end)
  33. EventFrame:RegisterEvent('ADDON_LOADED')
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 01-30-20 at 11:37 AM.
  Reply With Quote
01-31-20, 05:33 AM   #2
BloodDragon
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Mar 2017
Posts: 32
Originally Posted by Fizzlemizz View Post
Something like:

Lua Code:
  1. local EventFrame = CreateFrame("Frame", "BloodDragonAzMover", UIParent)
  2. EventFrame:Hide()
  3. EventFrame:SetSize(50, 15)
  4. EventFrame:SetFrameStrata("HIGH")
  5. EventFrame:SetPoint("TOPLEFT", 20, -100)
  6. EventFrame:SetMovable(true)
  7. EventFrame:SetClampedToScreen(true)
  8. EventFrame:EnableMouse(true)
  9. EventFrame:SetHitRectInsets(-5, -5, -5, -5)
  10. EventFrame:RegisterForDrag("LeftButton")
  11. EventFrame:SetUserPlaced(true)
  12. EventFrame:SetScript("OnDragStart", function(self, button)
  13.     if button=="LeftButton" and IsModifiedClick()then
  14.         self:StartMoving()
  15.     end
  16. end)
  17. EventFrame:SetScript("OnDragStop", function(self, button)
  18.     self:StopMovingOrSizing()
  19. end)
  20. EventFrame:SetScript('OnEvent', function(self, event, name)
  21.     if name == 'Blizzard_AzeriteEssenceUI' then
  22.         self:UnregisterAllEvents()
  23.         local MAEU = AzeriteEssenceUI
  24.         self:SetParent(MAEU)
  25.         self:SetSize(MAEU:GetWidth()-50, 15) -- -50 to not block the close button
  26.         MAEU:ClearAllPoints()
  27.         MAEU:SetPoint("TOP", self)
  28.         MAEU.ClearAllPoints = function() end
  29.         MAEU.SetPoint = function() end
  30.         self:Show()
  31.     end
  32. end)
  33. EventFrame:RegisterEvent('ADDON_LOADED')
ohhh cool thx alot, that works very nice.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Error on Move Frame Addon


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off