ScriptCreateDialog.xml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="ScriptCreateDialog" inherits="ConfirmationDialog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
  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 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. <argument index="0" name="inherits" type="String" />
  21. <argument index="1" name="path" type="String" />
  22. <argument index="2" name="built_in_enabled" type="bool" default="true" />
  23. <argument index="3" name="load_enabled" type="bool" default="true" />
  24. <description>
  25. Prefills required fields to configure the ScriptCreateDialog for use.
  26. </description>
  27. </method>
  28. </methods>
  29. <members>
  30. <member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok" overrides="AcceptDialog" default="false" />
  31. <member name="margin_bottom" type="float" setter="set_margin" getter="get_margin" overrides="Control" default="258.0" />
  32. <member name="margin_right" type="float" setter="set_margin" getter="get_margin" overrides="Control" default="366.0" />
  33. <member name="rect_size" type="Vector2" setter="_set_size" getter="get_size" overrides="Control" default="Vector2( 366, 258 )" />
  34. <member name="window_title" type="String" setter="set_title" getter="get_title" overrides="WindowDialog" default="&quot;Attach Node Script&quot;" />
  35. </members>
  36. <signals>
  37. <signal name="script_created">
  38. <argument index="0" name="script" type="Script" />
  39. <description>
  40. Emitted when the user clicks the OK button.
  41. </description>
  42. </signal>
  43. </signals>
  44. <constants>
  45. </constants>
  46. </class>