Thread Tools Display Modes
12-02-16, 02:54 AM   #1
alikim
A Fallenroot Satyr
Join Date: Jul 2015
Posts: 27
How to move UIErrorsFrame?

I tried to do this:

Code:
function moveFrames()
UIErrorsFrame:SetMovable(true)
UIErrorsFrame:SetPoint("CENTER", UIParent, "CENTER", 0, 0)
end
doesn't work

I even tried to do it through

Code:
UIErrorsFrame:HookScript("OnUpdate", moveFrames)
doesn't work either.

Is there a way to move that frame in a couple lines of code?

Thank you,
  Reply With Quote
12-02-16, 03:04 AM   #2
MunkDev
A Scalebane Royal Guard
 
MunkDev's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2015
Posts: 431
Lua Code:
  1. local f = UIErrorsFrame
  2. f:SetMovable(true)
  3. f:RegisterForDrag('LeftButton')
  4. f:SetScript('OnDragStart', f.StartMoving)
  5. f:SetScript('OnDragStop', f.StopMovingOrSizing)
__________________
  Reply With Quote
12-02-16, 03:35 AM   #3
alikim
A Fallenroot Satyr
Join Date: Jul 2015
Posts: 27
I don't need to drag it, just to move it permanently.

That being said, this script does nothing.
  Reply With Quote
12-02-16, 04:35 AM   #4
MunkDev
A Scalebane Royal Guard
 
MunkDev's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2015
Posts: 431
You used SetMovable in your code, which is a function that's associated with manually moving it with the mouse. The script won't work if the frame itself isn't mouse enabled. :EnableMouse solves that.

If you just want to set another point, then just do:
Lua Code:
  1. UIErrorsFrame:ClearAllPoints()
  2. UIErrorsFrame:SetPoint('CENTER', 0, 0)
__________________
  Reply With Quote
12-02-16, 08:18 AM   #5
alikim
A Fallenroot Satyr
Join Date: Jul 2015
Posts: 27
Thank you!
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » How to move UIErrorsFrame?

Thread Tools
Display Modes

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