In-order to move the Blizzard Unit Frames, you
need to figure out the frame name. You can figure out the frame's
name by mousing over the frame and pasting this macro in the edit
box in-game: /run local f = GetMouseFocus(); if f then
DEFAULT_CHAT_FRAME:AddMessage(f:GetName())
end . If you've performed my instructions
correctly, the name of the frame should have appeared in your chat
window.
Once you've figured out the frame's name you want to move,
you're ready to move! The most simple method for moving a frame
is: /run local f=PlayerFrame;
f:SetUserPlaced(true) f:SetMovable(true) f:EnableMouse(true)
f:RegisterForDrag("LeftButton")
f:SetScript("OnDragStart",f.StartMoving)
f:SetScript("OnDragStop",f.StopMovingOrSizing) and
/run local f=PartyMemberFrame1; f:SetUserPlaced(true)
f:SetMovable(true) f:EnableMouse(true)
f:RegisterForDrag("LeftButton")
f:SetScript("OnDragStart",f.StartMoving)
f:SetScript("OnDragStop",f.StopMovingOrSizing) There
are only two frames I know of that this script will work on without
any issues. They are the player frame and party frame as shown
above. If you have a frame you'd like to move,
replace /run local
f=PlayerFrame
with /run local f="Frame you
want to move" (no quotations).
The Workaround:
In-order to move the target frame, you need to make a macro.
That macro needs this script: /run
TargetFrame:ClearAllPoints() TargetFrame:SetPoint("TOPLEFT",
200, -300) You're
probably wondering why you need a macro for this script. The reason
is every-time you log out or reload the UI, the target frame goes
back to it's default position. Press this macro every-time you log
in, and it will go to the coordinates you set. You're going to have
to adjust the coordinates to your liking(, 200, -300) because
everyone's monitor/resolution is different. If you have a frame
you'd like to move,
replace /run
TargetFrame:ClearAllPoints() TargetFrame
with /run "Frame you want to
move":ClearAllPoints() "Frame you want to move"
(no quotations).
Well, that's it for now. Hopefully this was helpful. Feel free
to leave a comment if you have any questions or problems. Thank
you!
原文地址:
译:
你要移动单位框体 首先要知道框体名字
把鼠标移动到框体上 在游戏中的编辑框内运行此宏
/run local f = GetMouseFocus(); if f then
DEFAULT_CHAT_FRAME:AddMessage(f:GetName()) end
如果你做对了的话,框体名字会出现在你的聊天框里
一旦你找到了名字 你就准备好可以移动了!
最简单的移动方法是搞这个:
/run local f=PlayerFrame; f:SetUserPlaced(true) f:SetMovable(true)
f:EnableMouse(true) f:RegisterForDrag("LeftButton")
f:SetScript("OnDragStart",f.StartMoving)
f:SetScript("OnDragStop",f.StopMovingOrSizing)
和/run local f=PartyMemberFrame1; f:SetUserPlaced(true)
f:SetMovable(true) f:EnableMouse(true)
f:RegisterForDrag("LeftButton")
f:SetScript("OnDragStart",f.StartMoving)
f:SetScript("OnDragStop",f.StopMovingOrSizing)
我知道有2种框体是不出问题可以搞定的:玩家和小队
如果想移动其他框体
把/run local f=PlayerFrame
换成/run local f="Frame you want to move" (没有引号)
想要移动 目标的框体(就是target) 的话
要运行这样的宏
/run TargetFrame:ClearAllPoints()
TargetFrame:SetPoint("TOPLEFT", 200, -300)
你肯定在想丫的为什么还要另搞个宏搞这个框体
是因为当你每次登出或者重载UI时 丫的目标框体会回到原来的位置
所以每当登陆的时候 就运行一次这个宏 这样 这丫的目标框体就能去到你想去的地方
另外 你要改变(200,-300)这个数值 以适应自己的画面
因为每个人显示器、分辨率都是不同的
如果想移其他窗口
换/run TargetFrame:ClearAllPoints() TargetFrame
成/run "Frame you want to move":ClearAllPoints() "Frame you want to
move"(没有引号)
好了 搞定