Anchoring an addon frame to another addon
Recently I've been trying to finalize the changes to my UI and I'd really like to anchor my cooldown monitors frame to the top of my raid frames. I'm using Vlakcooldowns which I'd like to anchor to the top center of my oUF raid frames so the monitor is always right at the top of my raid frames regardless of if I', in a 10 or 25 man group.
How would I go about accomplishing this? |
This is how I would do it:
1. /fstack and turn on showing the name of frames when you mouse over stuff. 2. Mouse over the frame you wish to move and write it's name down 3. Mouse over the frame you wish to anchor something to and write it's name down 4. /run local a,b=FrameA,FrameB a:ClearAllPoints() a:SetPoint("TOPLEFT", b, "TOPLEFT", 0, 0) You may have to play around a bit, the documentation of "SetPoint" is http://www.wowpedia.org/API_Region_SetPoint and it may help if you are stuck on what values for "TOPLEFT" there are and what the different stuff mean. |
Keep in mind that frame names are case sensitive when doing this.
|
Quote:
This is what I have right now /run local a,b=vlakCooldownsAnchor,oUF_Raid a:ClearAllPoints() a:SetPoint("TOP", b, "TOP", 15, 70) Code:
local anchor = CreateFrame("Frame", "vlakCooldownsAnchor", UIParent) Code:
anchor:ClearAllPoints() |
You could replace
Code:
if event == "SPELLS_CHANGED" or event == "PLAYER_ENTERING_WORLD" or event == "PLAYER_TALENT_UPDATE" then Code:
if event == "SPELLS_CHANGED" or event == "PLAYER_ENTERING_WORLD" or event == "PLAYER_TALENT_UPDATE" then |
works perfectly. Thanks :D
|
Also mate, this is the perfect time to bring this up: why not make yourself an addon for your private needs?
I myself got one that I use to add special functions and features, like moving frames around, anchoring, e.g. Problem by editing other addons is that when they get a new version you must remember to apply the modifications to the new version, it's a hard task if you wish to use an updater or if you don't know addon coding. Instead make your own addon that you do stuff like this in. Just a tip! ;) |
Ultimately that is the goal, but I'm in the process of learning lua right now (slow and steady process). I comment out the original lua and document what I change so I know exactly what I did so when it comes to update addons I can recreate what I have pretty effectively. I could upload "my" versions of the addons and keep them updated but it would basically be a 99.5% copy of others addons and I'd hate to get any credit for others hard work. :p
|
Don't worry about using other peoples work for your own private addon. :)
By the way one way you can do a "fix" for the position of vlakCooldowns is to make an addon and a lua file and in that file put this code (this is just a suggestion, there are far better ways of doing this, programing is like art). lua Code:
|
All times are GMT -6. The time now is 09:52 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI