WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Search/Requests (https://www.wowinterface.com/forums/forumdisplay.php?f=6)
-   -   Looking for a DefaultUI Mover (https://www.wowinterface.com/forums/showthread.php?t=39594)

Lily.Petal 04-11-11 03:14 AM

Looking for a DefaultUI Mover
 
I am currently looking for a Addon that can move certain things. I am not looking for something complex, maybe something along the lines of:

/[addonname] config; (for the addon)
or
/[addonname] unlock; -- Will unlock things from the UI, such as durability, world state, text that comes up in the middle, error text (abilities), etc.

Something easy that will just let me do that, and maybe let me hide things.
Not something that gives me everything but the kitchen sink though lol.

Any suggestions?

Nibelheim 04-11-11 03:52 AM

Quote:

Originally Posted by Lily.Petal (Post 234285)
I am currently looking for a Addon that can move certain things. I am not looking for something complex, maybe something along the lines of:

/[addonname] config; (for the addon)
or
/[addonname] unlock; -- Will unlock things from the UI, such as durability, world state, text that comes up in the middle, error text (abilities), etc.

Something easy that will just let me do that, and maybe let me hide things.
Not something that gives me everything but the kitchen sink though lol.

Any suggestions?

Hmm, since it's for your own UI, it'd be most efficient to make your own little addon to do it. Gimme 30 minutes, and I'll whip up some Lua.

Lily.Petal 04-11-11 03:55 AM

Quote:

Originally Posted by Nibelheim (Post 234286)
Hmm, since it's for your own UI, it'd be most efficient to make your own little addon to do it. Gimme 30 minutes, and I'll whip up some Lua.

You're a God send you know that? I feel bad at the same time since you always come to my rescue xD

Lily.Petal 04-11-11 04:13 AM

Quote:

Originally Posted by Nibelheim (Post 234286)
Hmm, have you made any addons before?

None, what so ever :)

My only experience is changing something in the Lua to fit my needs, adding a thing here and there, and some other things. I do not know how to make a entire addon though ^^v

EDIT: looks like you deleted your post when I posted mine lol :o

Nibelheim 04-11-11 04:22 AM

1 Attachment(s)
Quote:

EDIT: looks like you deleted your post when I posted mine lol
Figured I'd just make the addon, as it's quick enough :)

LP_FrameMover
removed link to off-site download -Seerah
added link back in (at bottom), take that! :p -Nibelheim

Now, it's certainly not the most convenient method of moving / hiding frames, but it's the most reliable.

Just /framestack to find the name of the frame you want to move / hide, and edit the Core.lua file accordingly.

To find out the current Point, RPoint, X, and Y positions of any frame, simply type this code into your chat window:

Code:

/run print(FrameName:GetPoint())
It'll print out "Point Parent RPoint X Y"


PS.
If you want to start moving / hiding frames that are created by Load-on-demand addons, things get a little trickier. There's also some complex frames to look out for, one of note is the VehicleSeatIndicator frame.

PSS.
This is untested as I'm not at my WoW PC atm, so if any errors occur, let us know :p

PSSS.
Interesting, it actually took me exactly 30 minutes to do. >.>

PSSSS.
Heh, just kidding, 4 PSs would be nuts!

Lily.Petal 04-11-11 04:27 AM

You're like half the reason my UI is working correctly/as intended xD <3

PS: Drink much coffee lol? I did one RL and you have like 4 PSSSSSSSS

Code:

/run print(DurabilityFrame:GetPoint())
Got me:
Code:

TOPRIGHT table: 1EFFBBA0 BOTTOMRIGHT -0 0
Time to see if this works :D

Nibelheim 04-11-11 04:33 AM

Just as reference, these are some of the frame names I'm manipulating in RealUI.

"ZoneTextFrame" -- Text that appears when you change zones
"RaidWarningFrame" -- Raid warning messages in the middle of screen
"TicketStatusFrame" -- GM Ticket status
"GroupLootFrame1" -- Loot Rolling frames
"GroupLootFrame2"
"GroupLootFrame3"
"GroupLootFrame4"
"WorldStateAlwaysUpFrame" -- PvP info at Top Center of screen
"UIErrorsFrame" -- Error messages
"PlayerPowerBarAlt" -- Sound bar and Insanity gauge on Atremedes, Cho'gall, etc
"DurabilityFrame"
"Boss1TargetFrame"
"Boss2TargetFrame"
"Boss3TargetFrame"
"Boss4TargetFrame"
"CompactRaidFrameManager" -- I hide the default Blizz raid frames

Nibelheim 04-11-11 04:34 AM

Quote:

Originally Posted by Lily.Petal (Post 234293)
You're like half the reason my UI is working correctly/as intended xD <3

PS: Drink much coffee lol? I did one RL and you have like 4 PSSSSSSSS

Code:

/run print(DurabilityFrame:GetPoint())
Got me:
Code:

TOPRIGHT table: 1EFFBBA0 BOTTOMRIGHT -0 0
Time to see if this works :D

Just don't use "table: 1EFFBBA0" in the code. :P Best to leave the Parent field as nil for now.


Actually, noticed a small bug. In Core.lua, change the line:

Code:

p = t.parent and _G[t.parent] or UIParent
to

Code:

p = t.parent and _G[t.parent] or f:GetParent()

Lily.Petal 04-11-11 04:36 AM

Having some trouble with moving the DurabilityFrame... I'm sure I am just doing it wrong.. ><

Code:

["DurabilityFrame"] = {parent = nil, point = "TOPRIGHT", rpoint = "BOTTOMRIGHT", x = -300, y = 0, scale = 1},
It's -300 atm because I am trying to test it :P

Code:

Interface\AddOns\LP_FrameMover\Core.lua:45: attempt to call field 'MoveFrames' (a nil value)
Count: 1

Call Stack:
[C]: in function `MoveFrames'
Interface\AddOns\LP_FrameMover\Core.lua:45: in function <Interface\AddOns\LP_FrameMover\Core.lua:44>

Error :o

Nibelheim 04-11-11 04:38 AM

Quote:

Originally Posted by Lily.Petal (Post 234296)
Having some trouble with moving the DurabilityFrame... I'm sure I am just doing it wrong.. ><

Code:

["DurabilityFrame"] = {parent = nil, point = "TOPRIGHT", rpoint = "BOTTOMRIGHT", x = -300, y = 0, scale = 1},
It's -300 atm because I am trying to test it :P

It might be because of the little bug I spotted. I edited my previous post with the correction.

Lily.Petal 04-11-11 04:40 AM

Saw that, then I noticed I had an error somewhere

Nibelheim 04-11-11 04:42 AM

Quote:

Originally Posted by Lily.Petal (Post 234298)
Saw that, then I noticed I had an error somewhere

Oops. Near the very bottom of Core.lua, replace FM.MoveFrames() with FM.MoveAllFrames()

So, with those two bug corrections, it should hopefully work :p

Lily.Petal 04-11-11 04:49 AM

Hmm... still doesn't seem to be moving at all. No errors this time or anything

Code:

["DurabilityFrame"] = {parent = nil, point = "CENTER", rpoint = "CENTER", x = -300, y = 0, scale = 1},
could it be the parent = nil? Since it has nothing it's attached to?
I have no problem waiting for you to get home and testing it for yourself though.

Nibelheim 04-11-11 04:52 AM

Quote:

Originally Posted by Lily.Petal (Post 234300)
Hmm... still doesn't seem to be moving at all. No errors this time or anything

Code:

["DurabilityFrame"] = {parent = nil, point = "CENTER", rpoint = "CENTER", x = -300, y = 0, scale = 1},
could it be the parent = nil? Since it has nothing it's attached to?
I have no problem waiting for you to get home and testing it for yourself though.

Well, the code's set up so that if Parent is nil, it'll parent the frame to it's current parent. I'll see what's up :)

Lily.Petal 04-11-11 05:09 AM

Quote:

Originally Posted by Nibelheim (Post 234301)
Well, the code's set up so that if Parent is nil, it'll parent the frame to it's current parent. I'll see what's up :)

Just tried Hiding things as well, didn't seem to work :(

Nibelheim 04-11-11 05:09 AM

Alright. In the FM.MoveAllFrames = function() block, add the line below right after the f:SetScale(t.scale) line.


f.SetPoint = function() end

So, should look like:
Code:

FM.MoveAllFrames = function()
        for i,v in pairs(MoveFrameList) do
                local t = MoveFrameList[i]
                local f, p = _G[i]
                if f then
                        p = t.parent and _G[t.parent] or f:GetParent()
                        f:ClearAllPoints()
                        f:SetPoint(t.point, p, t.rpoint, t.x, t.y)
                        f:SetScale(t.scale)
                        f.SetPoint = function() end
                end
        end
end

Quote:

Just tried Hiding things as well, didn't seem to work
Oops, typo on my part.

Change the line local f = _G[i] in the FM.HideAllFrames = function() block to:

Code:

local f = _G[v]
So, should look like:
Code:

FM.HideAllFrames = function()
        for i,v in pairs(HideFrameList) do
                local f = _G[v]
                if f then


Lily.Petal 04-11-11 05:10 AM

1 Attachment(s)
Oh Nib, you're like my own little Evil Genius~ :D

Thank you so much lol ^^

~ Yes that means it started working ^^v

EDIT: Added that list bit in too~ Will test right now.
EDIT2: Yes I love my ~ Signs.
EDIT3: Image of my DurabilityFrame moved (topleft), Hiding frames work too.

EDIT4: another post going straight into my sig ;D I also put

Code:

--[[Common Frames: (http://wowprogramming.com/utils/artbrowser)
        "ZoneTextFrame"        -- Text that appears when you change zones
        "RaidWarningFrame"        -- Raid warning messages in the middle of screen
        "TicketStatusFrame"        -- GM Ticket status
        "GroupLootFrame1"        -- Loot Rolling frames
        "GroupLootFrame2"
        "GroupLootFrame3"
        "GroupLootFrame4"
        "WorldStateAlwaysUpFrame"        -- PvP info at Top Center of screen
        "UIErrorsFrame"        -- Error messages
        "PlayerPowerBarAlt"        -- Sound bar and Insanity gauge on Atremedes, Cho'gall, etc
        "DurabilityFrame"
        "Boss1TargetFrame"
        "Boss2TargetFrame"
        "Boss3TargetFrame"
        "Boss4TargetFrame"
        "CompactRaidFrameManager"        -- I hide the default Blizz raid frames
]]

At the very bottom for future reference for myself ^^v

Nibelheim 04-11-11 05:29 AM

Quote:

Originally Posted by Lily.Petal (Post 234304)
EDIT4: another post going straight into my sig ;D

Hmm, I see I'm building up quite a list :p Oh well, getting late and bed time for me :)

Zagrei 04-11-11 11:47 AM

This seems really interesting! I have one question: Has the download link been updated with the changes/bugs mentioned in this thread, or do they still need to be applied?

I guess I could check it myself, but I thought I would ask ;)

EDIT: Just realized that the post with the link was last edited over an hour before the more recent posts. There's my answer! Haha :rolleyes:

Lily.Petal 04-11-11 02:04 PM

Quote:

Originally Posted by Zagrei (Post 234320)
This seems really interesting! I have one question: Has the download link been updated with the changes/bugs mentioned in this thread, or do they still need to be applied?

I guess I could check it myself, but I thought I would ask ;)

EDIT: Just realized that the post with the link was last edited over an hour before the more recent posts. There's my answer! Haha :rolleyes:

takes like 10 seconds to fix everything :P I'm sure if you ask Nib nicely he will update/upload this when he gets up. ^^v


All times are GMT -6. The time now is 09:57 AM.

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