WoW:Creating standard left-sliding frames (source)
Revision as of 22:39, 5 January 2006
, 5 January 2006no edit summary
No edit summary |
|||
| Line 5: | Line 5: | ||
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: | 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 }; | UIPanelWindows["MyFrameName"] = { area = "left", pushable = 5, whileDead = 1 }; | ||
'area' is left (most frames), middle (menu or if two left frames are open), fullscreen (map), doublewide (auction), or center (main menu).<br> | '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.<br> | ||
'whileDead' specifies that the frame can be opened while the player is dead. Leave this field out (or set it to nil) to prevent the player from accessing the frame while dead. | |||
Finally, you'll need to use ShowUIPanel(frame) and HideUIPanel(frame) instead of frame:Show() / Hide(); | Finally, you'll need to use ShowUIPanel(frame) and HideUIPanel(frame) instead of frame:Show() / Hide(); | ||