WoW:Creating standard left-sliding frames: Difference between revisions
m (reorg credit) |
|||
Line 7: | Line 7: | ||
UIPanelWindows["MyFrameName"] = { area = "left", pushable = 5 }; | UIPanelWindows["MyFrameName"] = { area = "left", pushable = 5 }; | ||
'area' is left (most frames), middle (menu or if two left frames are open), fullscreen (map), | 'area' is left (most frames), middle (menu or if two left frames are open), fullscreen (map), doublewide (auction), or center (main menu).<br> | ||
'pushable' specifies the priority of your window. If two other "left" windows are already open, when a third frame opens, the one with the lowest priority is closed. | 'pushable' specifies the priority of your window. If two other "left" windows are already open, when a third frame opens, the one with the lowest priority is closed. | ||
Revision as of 20:32, 5 December 2005
How do I get my frames to arrange like the standard wow frames do (sliding over from the left)?
On with the show
The container (bag) frames have their own custom code which uses SetPoint to adjust them relative to each other, but frames like the CharacterInfo and Merchant use common functions from UIParent.lua. To start with you'll need to add this in your initialization, along with other global declarations. I read on another site that it needs to go in the onload section. This didn't work for me. Stick it at the top, and it should work:
UIPanelWindows["MyFrameName"] = { area = "left", pushable = 5 };
'area' is left (most frames), middle (menu or if two left frames are open), fullscreen (map), doublewide (auction), or center (main menu).
'pushable' specifies the priority of your window. If two other "left" windows are already open, when a third frame opens, the one with the lowest priority is closed.
Finally, you'll need to use ShowUIPanel(frame) and HideUIPanel(frame) instead of frame:Show() / Hide();
Sources
- http://capnbry.net/wow/ by cpnbry