WoW-Pro Guides

WoW-Pro Guides

3M Downloads

Persistent Frame Location

Dissectional opened this issue ยท 5 comments

commented

I've noticed WoW-Pro stores the frame location data in layout-local.txt.
This means that the frame can be moved around and it's position will be remembered between sessions as long as the addon remains enabled.

If the addon is disabled, it's location is erased from layout-local.txt and the frame's position is reset to default when it is next enabled.

I think the frames position needs to be moved to the config file WoW\WTF\Account\[ACCOUNT]\SavedVariables\WoWPro.lua so that it remains persistent.

I've taken to making my layout-local.txt file readonly to work around this.

commented

I hope I am not resurrecting an old topic, but it appears to be still in "Open" status and this is what I got by searching for "anchor". At any rate, it would be great if we could specify an "anchor position" (e.g. "Top Right") and the frame would always "grow" or "shrink" with that anchor point in mind. Should I put this in another thread or is this fine here?

commented

Sorry about not keeping up here. The whole anchoring mechanism was reworked in 117b7e4 so that anchoring was under the UI's control, but stored by the addon. So if the window is moved so it is close to the top right, then the coordinate of the top right corner gets chosen as the "natural" anchor point returned from GetPoint(1)

This behavior keeps the dammed window from "crawling", but does not have the flexibility in choosing the anchor explicitly. So if you want that, please open another issue.

I should have closed this one back in February.

commented

@Ludovicus-Maior - Hey thanks for the quick reply. I didn't do a great job of explaining my issue: When the panel is resized and then resized back again, it is constantly moving to a new location on the screen so that I have to manually move it back again. It would be great if I didn't have to manually move it back all the time. Do I need to create a new issue or are you saying this should be resolved in a new build?

commented

Please create a new issue, preferably with some screenshots or even a short low-res movie demonstrating the issue. I have to confess, I'm pretty dense when it comes to UI issues, so pictures and a step-by-step description has alot of value.

commented

We do not explicitly store our frame location information in layout-local.txt. We do not call :SetUserPlaced() on our windows, so its appearance in layout-local.txt is due to you moving the frame. However, the anchor point and the positional parameters are chosen by Blizzard and not us. Also, as you noted, the window position gets wiped on addon disable.

I'll see what I can code up.