WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   8.0 MainMenuBar help (https://www.wowinterface.com/forums/showthread.php?t=56369)

Kenjub 07-18-18 04:31 AM

8.0 MainMenuBar help
 
Hey guys, having a bit of trouble.

I'm using my own addon of sorts to manipulate the placement of various things on the screen, and now at 8.0 launch I'm having trouble adjusting the positioning of the MainMenuBar.

This is the script I've previously used to change the positioning of the main menu bar:

Code:

MainMenuBar:ClearAllPoints();MainMenuBar:SetPoint('CENTER',UIParent,'CENTER',253.5,-590);MainMenuBar:EnableMouse(0);MainMenuBar:SetScale(0.7)
now, if I use it ingame via /script, it'll adjust the positioning, scale, etc, but it'll revert itself to default blizzard if you change a zone or so much breathe at your screen.

I tried working around with this:

Code:

local x:MainMenuBar
x:MainMenuBar:ClearAllPoints()
x:MainMenuBar:SetPoint('CENTER',UIParent,'CENTER',253.5,-590)
x:MainMenuBar:EnableMouse(0)
x:MainMenuBar:SetScale(0.7)


but it doesn't work (in fact it breaks my addon completely).

What can I do to fix this? Cheers!

d87 07-18-18 05:25 AM

you can set it to be userplaced, you just need it to be movable first

Code:

MainMenuBar:SetMovable(true)
MainMenuBar:SetUserPlaced(true)
MainMenuBar:ClearAllPoints()
MainMenuBar:SetPoint("CENTER", UIParent, "CENTER",0,0)


Kenjub 07-18-18 05:26 AM

Code:

--local b=ArtifactWatchBar
--b:UnregisterAllEvents()
--b:Hide()
--b.Show=b.Hide

I used this to hide artifact in legion, same could be used for honor bar, exp bar, etc. Should work for azerite?

Kenjub 07-18-18 05:27 AM

Quote:

Originally Posted by d87 (Post 328670)
oh wait, you actually can set it to be userplaced, you just need it to be movable first

Code:

MainMenuBar:SetMovable(true)
MainMenuBar:SetUserPlaced(true)
MainMenuBar:ClearAllPoints()
MainMenuBar:SetPoint("CENTER", UIParent, "CENTER",0,0)


Moving it isn't an issue though, you can use my first code snippet from my first post to move it ingame via /script <insertCode> even without making it movable. The issue is keeping it in the positiong you moved it/resized it to :(

d87 07-18-18 05:32 AM

it is the issue, when you set it to userplaced it stops being reset in default ui frame manager.

Kenjub 07-18-18 08:14 AM

Quote:

Originally Posted by d87 (Post 328673)
it is the issue, when you set it to userplaced it stops being reset in default ui frame manager.

Ah yeah, true :)

Cheers!

Coldkil 07-18-18 11:33 PM

I am having the same issue, so i used the same way to move the MainMenu Bar.

It "worked", as it's now in the center of the screen but any SetPoint just doesn't work, as parenting it to any other frame.

Code is nothing fancy, exactly the same as above.

Any idea? I can provide screen and code if needed.

EDIT: apparently now it's "fixed", as in i still cannot parent it to anything else than UIParent but i can move it freely. ActionButton frames are a different story, but moving them intependently just makes them lose every attribute and the bar pagin doesn't work anymore. I'll need to chek if i'm disabling scrpts or such in other addon files.

EDIT2: it broke again. Cannot move anything again, i don't see hotkeys, cannot click with mouse. Dunno what's breaking everything like this.

EDIT3: it braks as soon as i set SetUserPlaced(true). SetMovable has no issues apparently. Also resizing it has no effect.

Drudatz 07-20-18 07:04 PM

Quote:

Originally Posted by d87 (Post 328670)
you can set it to be userplaced, you just need it to be movable first

[code]MainMenuBar:SetMovable(true)
MainMenuBar:SetUserPlaced(true)
[code]

Thanks for this, I had to use it to be able to scale my bars again.


All times are GMT -6. The time now is 10:32 AM.

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