View Single Post
04-02-09, 10:51 AM   #10
Zyonin
Coffee powered Kaldorei
 
Zyonin's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 1,443
Originally Posted by Spectro View Post
Strange, it's working now. It must have been a conflicting addon, because I always extract all my addons to the Addons folder unless the author says to do different. I installed BugSack anyway, for future reference.

Is there a way to move oUF frames, or are they stuck where they are? I like my unit frames to be in the top left corner like the default Blizzard ones.
I don't know lua so editing any files is out of the question..
Currently the only way to move most oUF layouts is by lua editing. However this not difficult. First of all, get a good text editor. Notepad is OK, however there are much better text editors such as Notepad++.

OK, now that you have selected your text editor, open up the oUF_Lily folder. Locate lily.lua. You can right click on then select "Open with..." or double click and then in the following menus, select your text editor to open the file with. Alternately, open your text editor first, then use its Open command.

Your copy of lily.lua is now open in your text editor. Scroll to the bottom of the file. You will see the following:
Code:
local focus = oUF:Spawn"focus"
focus:SetPoint("CENTER", 0, -500)
local pet = oUF:Spawn'pet'
pet:SetPoint('CENTER', 0, -450)
local player = oUF:Spawn"player"
player:SetPoint("CENTER", 0, -400)
local target = oUF:Spawn"target"
target:SetPoint("CENTER", 0, -351)
local tot = oUF:Spawn"targettarget"
tot:SetPoint("CENTER", 0, -300)
local party = oUF:Spawn("header", "oUF_Party")
party:SetPoint("TOPLEFT", 30, -30)
party:SetManyAttributes("showParty", true, "yOffset", -25)
party:Show()
Don't panic now as this is where you move the Frames to where you want them too. The important bits for you are contained in the (). These bits tell WoW where on screen to place the frames. Lets break them down using the "target" frame as our example:
  • "CENTER" tells WoW what part of your screen to anchor the frames. In this case the frame is being anchored from the center of your screen.
  • 0, -351 is the X,Y coordinates from the anchor point. In this case 0 means the frame is centered horizontally on screen and the -351 means the frame is located -351 px down from the center of your sceen.

OK Now set "player" and "target" to ("CENTER", 0, 0). Save the file and Alt-tab back to WoW.

Now use /console reloadui (or if you have an Ace3/Rock based mod installed, /rl. Some other mods will add the /rl command). Your UI will reload. Now your Player and Target frames will be in the center of your screen, one layered on top of the other. Select yourself or a "victim" (other player/NPC/mob) to confirm placement of the target frame. Alt-tab back to your text editor.

Now set "player" and "target" to ("TOPLEFT", 0, 0). Save the file. Alt-tab back to WoW.

Reload your UI as before. Now both your Player and Target frame will be in the upper left corner of your screen. Parts of them may be off screen. Alt-tab back to your Text editor

Now this where you place the frames to where you want them. Experiment with X, Y, coordinates. Note that if you are in a Party, your Party frames will likely be covered by your Player/Target frames until you move the Party frames. Your Pet, Target of Target and Focus frames will also have to be moved separately (but using the same method). Many other oUF layouts will anchor the pet frame to the player frame (so moving the player frame moves the pet frame) and the target of target frame to the target frame.

Things to note with lua editing:
  • Save your file. WoW will not see your changes until the changes are written to disc.
  • Reload your UI. You will not see any changes until you either log in or reload the UI. That is because WoW will only read the lua files at log in or upon reloading your UI.
  • If you totally mess up, just nuke the layout folder (not oUF itself) and drop a fresh copy in its place.
__________________
Twitter

Last edited by Zyonin : 04-03-09 at 02:46 AM. Reason: post clean up/fixed some typos
  Reply With Quote