Originally Posted by sylvanaar
Could be that XrystalUI_Splash has a size and an anchor point, while XrystalUI_Config_ProfileManager does not. This could lead to the 0 width problem you observed.
Lua Code:
<Frame name="XrystalUI_Splash" hidden = "false"> <Size x = "500" y = "300" /> <Anchors> <Anchor point = "CENTER" /> </Anchors>
|
XrystalUI_Splash plugs into UIParent and is the equivalent of XrystalUI_Config_ProfileManager which plugs into Blizzards Config system. As far as I know you don't specify any anchors or sizes as Blizzard does the work for you as soon as you tell it to add it to the Config system.
It does appear that the problem is due to how the two systems work. The example from Blizzard doesn't include anchors etc on their guide to using it on the beta code ..
https://github.com/tomrus88/Blizzard...tionsFrame.lua Which would confuse things.
However,
https://wow.gamepedia.com/Using_the_...s_Addons_panel does specify that FrameXML will reposition it and not resize it, which is what I assume it did, resize it to fit into their main panel.
Lua Code:
function XrystalUI_Config_ProfileManager_OnLoad(panel)
-- Set the name for the Category for the Panel
panel.name = addonData.Translate("Profile Manager")
-- the panel.name value of the parent configuration panel, used to display a hierarchical category tree.
-- If the parent panel is not specified or does not exist, the panel is displayed as a top-level panel
panel.parent = XrystalUI_Options.name
-- called when the player presses the Okay button, indicating that settings should be saved.
panel.okay = function(self) ClosePanel(self) end
-- called when the player presses the Cancel button, indicating that changes made should be discarded
panel.cancel = function(self) CancelOrLoadPanel(self) end
-- called when the frame is initially displayed, and after requesting the default values to be restored
panel.refresh = function(self) RefreshPanel(self) end
-- called when the player presses the Defaults button, indicating that default settings for the addon should be restored
panel.default = function(self) DefaultPanel(self) end
-- Add the panel to the Interface Options
InterfaceOptions_AddCategory(panel)
end
Oh well, it works now, and at least I can walk away knowing that the mystery is solved. I may end up hitting it again down the line so hopefully I will come across this post which will remind me why following the examples didn't work rofl. But seeing as I usually copy from an existing addon of mine that I know does what I want rofl .. it shouldn't be a problem anymore rofl.
Anyway thanks again.