ScriptCreateDialog.xml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="ScriptCreateDialog" inherits="ConfirmationDialog" category="Core" version="3.1">
  3. <brief_description>
  4. The Editor's popup dialog for creating new [Script] files.
  5. </brief_description>
  6. <description>
  7. The ScriptCreateDialog creates script files according to a given template for a given scripting language. The standard use is to configure its fields prior to calling a [method popup]() method.
  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. <demos>
  18. </demos>
  19. <methods>
  20. <method name="config">
  21. <return type="void">
  22. </return>
  23. <argument index="0" name="inherits" type="String">
  24. </argument>
  25. <argument index="1" name="path" type="String">
  26. </argument>
  27. <argument index="2" name="built_in_enabled" type="bool" default="true">
  28. </argument>
  29. <description>
  30. Prefills required fields to configure the ScriptCreateDialog for use.
  31. </description>
  32. </method>
  33. </methods>
  34. <signals>
  35. <signal name="script_created">
  36. <argument index="0" name="script" type="Script">
  37. </argument>
  38. <description>
  39. Emitted when the user clicks the OK button.
  40. </description>
  41. </signal>
  42. </signals>
  43. <constants>
  44. </constants>
  45. </class>