Thread Tools Display Modes
06-12-19, 03:28 AM   #1
LudiusMaximus
A Rage Talon Dragon Guard
 
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 320
Newbie questions for MoveAnything

I just started experimenting with MoveAnything for the first time. Maybe some more experienced users can help me with the following questions I could not solve in spite of extensive trial and online research.
  • What is the meaning of "synchronizing" in "synchronizes all frames modified by MoveAnything"?
    I cannot notice any effect when clicking the "S" button and the documentation does not say more than this sentence...
    What is the purpose of the option to "synchronize frames when exiting combat"?
  • What is the purpose of putting frames together in groups?
    Just that you can move them together retaining the relative positioning among them?
  • Is it possible to emulate the original UI, such that one frame (e.g. MerchantFrame) changes its position when another frame (e.g. CharacterFrame) opens?
    I tried setting the MerchantFrame (TOPLEFT) relative to the CharacterFrame (TOPRIGHT). But the MerchantFrame does not seem to take into account whether the CharacterFrame is open or not.

Thanks!

Last edited by LudiusMaximus : 06-12-19 at 05:08 AM. Reason: aditional question
  Reply With Quote
06-13-19, 06:58 AM   #2
LudiusMaximus
A Rage Talon Dragon Guard
 
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 320
I still don't know the answers to my first two questions, but I figured out a way to emulate the window repositioning I was referring to in the third question. If anyone is interested in this, add the following code to the end of MoveAnything.lua:

Code:
-- Function to check if the CharacterFrame should push away another frame.
function MovAny.characterFrameCheck(f, ...)
  
  -- Check which frame is open to replace the CharacterFrame, if any.
  local frameToMove = nil

  -- Only one of the following frames can be visible at a time!
  if (MerchantFrame:IsVisible()) then
    frameToMove = MerchantFrame
  elseif (MailFrame:IsVisible()) then
    frameToMove = MailFrame
  end
  
  if (not frameToMove) then
    return
  end

  local opt = MovAny:GetUserData(frameToMove:GetName())

  -- Check if CharacterFrame is visible.
  if (CharacterFrame:IsVisible()) then
    opt.pos = {"TOPLEFT", "CharacterFrame", "TOPRIGHT", 20, 0}
  else
    opt.pos = {"TOPLEFT", "CharacterFrame", "TOPLEFT", 0, 0}
  end
  
  MovAny.Position:Apply(opt, frameToMove)
  
end

hooksecurefunc(CharacterFrame, "Show", MovAny.characterFrameCheck)
hooksecurefunc(CharacterFrame, "Hide", MovAny.characterFrameCheck)

hooksecurefunc(MerchantFrame, "Show", MovAny.characterFrameCheck)
hooksecurefunc(MailFrame, "Show", MovAny.characterFrameCheck)

Last edited by LudiusMaximus : 06-14-19 at 03:12 AM.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Newbie questions for MoveAnything

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