Minimap Button Frame Redux

Minimap Button Frame Redux

7.9k Downloads

3.2.2 Does not correctly restore show/hide state on login/reload

brykrys opened this issue ยท 8 comments

commented

The show/hide state of MinimapButtonFrame appears to be saved across sessions in bachMBF.db.profile.mbfHidden

During login, in the function bachMBF:Init(), it does initially check bachMBF.db.profile.mbfHidden and hides MinimapButtonFrame accordingly (MinimapButtonFrameRedux.lua lines 848-849)

However it then calls function MBFC_RollUp() with a parameter of 1 or 2 based on saved value bachMBF.db.profile.rollUp (lines 852-855)

MBFC_RollUp() overrides bachMBF.db.profile.mbfHidden and changes the show/hide state of MinimapButtonFrame (lines 2022-2023 & 2030-2031), effectively based on the value of bachMBF.db.profile.rollUp

The end result is that the saved value of bachMBF.db.profile.mbfHidden always gets overridden and ignored, and the show/hide state of MinimapButtonFrame does not get correctly restored on login/reload.

commented

Is this still occurring?

commented

I'm not certain I understand what you're saying the problem is here.

The hidden variable doesn't mean visible/invisible, it was pertaining to the expanded/collapsed state of the frame.
There's actually two buttons if you look at the XML. The hidden state is for the button and when it's true, the other button should show and vice versa.

If you're able to get this into a state where neither button is showing (without directly calling the hide methods), I'd consider that a bug that I'd need to fix with how this is written.

If you'd like an option to fully hide everything including the button, that's not something that's currently a feature and would need to be a feature request. If that's not what you mean, I'm not sure I understand. The expanded/collapsed state does persist logins for me.

commented

From what I can see there are:

The main frame MinimapButtonFrame (containing the collected buttons)

Two drag buttons MinimapButtonFrameDragButton and MBFRestoreButton (attached to MBFRestoreButtonFrame), which appear to overlap each other? Both of them are hidden by the 'locked' option bachMBF.db.profile.locked

Plus the minimap button created by LibDBIcon, which can be used to toggle the main frame

The way I had it set up was to only have the minimap button visible at startup - I keep the main frame hidden most of the time until i need one of the buttons, and I keep the 'locked' option on to permanently hide the drag button(s).

3.2.2 changed things so that the main frame was always shown at startup, and I had to hide it every login. (Until I changed the code to use bachMBF.db.profile.mbfHidden again)

commented
commented

The 'locked' option caused the drag (MBF) button(s) to be hidden. The 'mbfHidden' option caused the main (collected buttons) frame to be hidden, independently of the 'locked' option.

But there is an extra option to hide some or all elements of the main frame when the 'locked' option is enabled - this works by setting the alpha of the background or border to 0, and leaves the buttons themselves still visible.

(And there is a separate option to prevent dragging)

There are a lot of options, it gets a bit confusing how they work together, and I remember it took me a while to get it configured the way I wanted it...

commented

For information, my setup looks like this when open:

MBF_Open

At startup (and most of the time unless I need one of the buttons) only the MBF minimap button is visible (the one at top right in the image).

commented

I don't think I'm understanding then what you're saying it's doing wrong.

Can you describe specifically what behavior you're expecting?

What I did was

  1. enabled the minimap button
  2. enabled lock in the options (this caused all parts other than the collected buttons and the minimap button to vanish)
  3. collapsed the collected buttons
  4. restarted WoW

Doing that caused step 3 to be undone. Is that what you're saying is happening because if not, I'm not sure I'm understanding the issue.

commented

As you say, restarting WoW causes step 3 to be undone, and that is the issue in 3.2.2. In previous versions of MBF I expected it to remain in the same state as when it logged out.

My preference is to have all collected buttons collapsed, and the drag button(s) hidden, with only MBF's minimap button shown - other people may prefer a different setup, but probably they would still expect MBF to remain in the same state as when they logged out.

(Note I've temporarily hacked my copy to force my preference on login :)