WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   Newbie questions for MoveAnything (https://www.wowinterface.com/forums/showthread.php?t=57196)

LudiusMaximus 06-12-19 03:28 AM

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!

LudiusMaximus 06-13-19 06:58 AM

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)



All times are GMT -6. The time now is 06:26 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI