class_scriptcreatedialog.rst 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/ScriptCreateDialog.xml.
  6. .. _class_ScriptCreateDialog:
  7. ScriptCreateDialog
  8. ==================
  9. **Inherits:** :ref:`ConfirmationDialog<class_ConfirmationDialog>` **<** :ref:`AcceptDialog<class_AcceptDialog>` **<** :ref:`WindowDialog<class_WindowDialog>` **<** :ref:`Popup<class_Popup>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. The Editor's popup dialog for creating new :ref:`Script<class_Script>` files.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. 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 :ref:`Popup.popup<class_Popup_method_popup>` methods.
  15. ::
  16. func _ready():
  17. dialog.config("Node", "res://new_node.gd") # For in-engine types
  18. dialog.config("\"res://base_node.gd\"", "res://derived_node.gd") # For script types
  19. dialog.popup_centered()
  20. .. rst-class:: classref-reftable-group
  21. Properties
  22. ----------
  23. .. table::
  24. :widths: auto
  25. +-------------------------------+-------------------+----------------------------------------------------------------------------------------------------+
  26. | :ref:`bool<class_bool>` | dialog_hide_on_ok | ``false`` (overrides :ref:`AcceptDialog<class_AcceptDialog_property_dialog_hide_on_ok>`) |
  27. +-------------------------------+-------------------+----------------------------------------------------------------------------------------------------+
  28. | :ref:`float<class_float>` | margin_bottom | ``258.0`` (overrides :ref:`Control<class_Control_property_margin_bottom>`) |
  29. +-------------------------------+-------------------+----------------------------------------------------------------------------------------------------+
  30. | :ref:`float<class_float>` | margin_right | ``366.0`` (overrides :ref:`Control<class_Control_property_margin_right>`) |
  31. +-------------------------------+-------------------+----------------------------------------------------------------------------------------------------+
  32. | :ref:`Vector2<class_Vector2>` | rect_size | ``Vector2( 366, 258 )`` (overrides :ref:`Control<class_Control_property_rect_size>`) |
  33. +-------------------------------+-------------------+----------------------------------------------------------------------------------------------------+
  34. | :ref:`String<class_String>` | window_title | ``"Attach Node Script"`` (overrides :ref:`WindowDialog<class_WindowDialog_property_window_title>`) |
  35. +-------------------------------+-------------------+----------------------------------------------------------------------------------------------------+
  36. .. rst-class:: classref-reftable-group
  37. Methods
  38. -------
  39. .. table::
  40. :widths: auto
  41. +------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | void | :ref:`config<class_ScriptCreateDialog_method_config>` **(** :ref:`String<class_String>` inherits, :ref:`String<class_String>` path, :ref:`bool<class_bool>` built_in_enabled=true, :ref:`bool<class_bool>` load_enabled=true **)** |
  43. +------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. .. rst-class:: classref-section-separator
  45. ----
  46. .. rst-class:: classref-descriptions-group
  47. Signals
  48. -------
  49. .. _class_ScriptCreateDialog_signal_script_created:
  50. .. rst-class:: classref-signal
  51. **script_created** **(** :ref:`Script<class_Script>` script **)**
  52. Emitted when the user clicks the OK button.
  53. .. rst-class:: classref-section-separator
  54. ----
  55. .. rst-class:: classref-descriptions-group
  56. Method Descriptions
  57. -------------------
  58. .. _class_ScriptCreateDialog_method_config:
  59. .. rst-class:: classref-method
  60. void **config** **(** :ref:`String<class_String>` inherits, :ref:`String<class_String>` path, :ref:`bool<class_bool>` built_in_enabled=true, :ref:`bool<class_bool>` load_enabled=true **)**
  61. Prefills required fields to configure the ScriptCreateDialog for use.
  62. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  63. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  64. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  65. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`