ScriptCreateDialog.xml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="ScriptCreateDialog" inherits="ConfirmationDialog" category="Core" version="3.1.2">
  3. <brief_description>
  4. The Editor's popup dialog for creating new [Script] files.
  5. </brief_description>
  6. <description>
  7. The [code]ScriptCreateDialog[/code] creates script files according to a given template for a given scripting language. The standard use is to configure its fields prior to calling one of the [method Popup.popup] methods.
  8. [codeblock]
  9. func _ready():
  10. dialog.config("Node", "res://new_node.gd") # for in-engine types
  11. dialog.config("\"res://base_node.gd\"", "res://derived_node.gd") # for script types
  12. dialog.popup_centered()
  13. [/codeblock]
  14. </description>
  15. <tutorials>
  16. </tutorials>
  17. <methods>
  18. <method name="config">
  19. <return type="void">
  20. </return>
  21. <argument index="0" name="inherits" type="String">
  22. </argument>
  23. <argument index="1" name="path" type="String">
  24. </argument>
  25. <argument index="2" name="built_in_enabled" type="bool" default="true">
  26. </argument>
  27. <description>
  28. Prefills required fields to configure the ScriptCreateDialog for use.
  29. </description>
  30. </method>
  31. </methods>
  32. <signals>
  33. <signal name="script_created">
  34. <argument index="0" name="script" type="Script">
  35. </argument>
  36. <description>
  37. Emitted when the user clicks the OK button.
  38. </description>
  39. </signal>
  40. </signals>
  41. <constants>
  42. </constants>
  43. </class>