Closed wyattbiker closed 4 years ago
add_custom_type("ButtonDialog", "Panel", preload("ButtonDialogNode.gd"), preload("icon.png"))
This line means when you ask to add a ButtonDialog
from the Add Node
dialog, Godot will instanciate a Panel
and put the ButtonDialogNode.gd
on it with the specified custom icon. At no point the scene file is specified, and the script does nothing so the result is an empty panel.
I think it's not possible to specify a scene as a custom type, even if you have put a script on it, because the "add node" dialog is for adding standalone node types. You may have to either construct buttons from that script (or add a subscene), or simply use the chainlink button next to the "add node" button to quickly access scenes to instance.
ok thanks will look at alternate ways.
Godot version: 3.2Beta1 OS/device including version: Mac OS X, Mojave
Issue description: Panel plugin does not show button child nodes. Screen shots below
Steps to reproduce: Create a new project ButtonDialog and add empty Control scene. Create addons folder called ButtonDialog.. Create ButtonDialog.tscn with a Panel control (name it ButtonDialog) and add 4 buttons (e.g. Add,Edit,Delete Cancel).
Add the following gd files in the addons folder.
ButtonDialog.gd
ButtonDialogNode.gd
plugin.cfg
Enable the plugin in the Project. Add scene ButtonDialog using + to Control scene. Notice buttons do not show up when added as child plugin. (+) However buttons do show up when added as instance scene.
ButtonDialog.tscn
Control.tscn