ScriptEditor.xml 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="ScriptEditor" inherits="PanelContainer" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
  3. <brief_description>
  4. Godot editor's script editor.
  5. </brief_description>
  6. <description>
  7. [b]Note:[/b] This class shouldn't be instantiated directly. Instead, access the singleton using [method EditorInterface.get_script_editor].
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <methods>
  12. <method name="can_drop_data_fw" qualifiers="const">
  13. <return type="bool" />
  14. <argument index="0" name="point" type="Vector2" />
  15. <argument index="1" name="data" type="Variant" />
  16. <argument index="2" name="from" type="Control" />
  17. <description>
  18. </description>
  19. </method>
  20. <method name="drop_data_fw">
  21. <return type="void" />
  22. <argument index="0" name="point" type="Vector2" />
  23. <argument index="1" name="data" type="Variant" />
  24. <argument index="2" name="from" type="Control" />
  25. <description>
  26. </description>
  27. </method>
  28. <method name="get_base_editor" qualifiers="const">
  29. <return type="Control" />
  30. <description>
  31. Returns the underlying [Control] used for editing scripts. For text scripts, this is a [TextEdit].
  32. </description>
  33. </method>
  34. <method name="get_current_script">
  35. <return type="Script" />
  36. <description>
  37. Returns a [Script] that is currently active in editor.
  38. </description>
  39. </method>
  40. <method name="get_drag_data_fw">
  41. <return type="Variant" />
  42. <argument index="0" name="point" type="Vector2" />
  43. <argument index="1" name="from" type="Control" />
  44. <description>
  45. </description>
  46. </method>
  47. <method name="get_open_scripts" qualifiers="const">
  48. <return type="Array" />
  49. <description>
  50. Returns an array with all [Script] objects which are currently open in editor.
  51. </description>
  52. </method>
  53. <method name="goto_line">
  54. <return type="void" />
  55. <argument index="0" name="line_number" type="int" />
  56. <description>
  57. Goes to the specified line in the current script.
  58. </description>
  59. </method>
  60. <method name="open_script_create_dialog">
  61. <return type="void" />
  62. <argument index="0" name="base_name" type="String" />
  63. <argument index="1" name="base_path" type="String" />
  64. <description>
  65. Opens the script create dialog. The script will extend [code]base_name[/code]. The file extension can be omitted from [code]base_path[/code]. It will be added based on the selected scripting language.
  66. </description>
  67. </method>
  68. <method name="reload_scripts">
  69. <return type="void" />
  70. <description>
  71. Reload all currently opened scripts from disk in case the file contents are newer.
  72. </description>
  73. </method>
  74. </methods>
  75. <signals>
  76. <signal name="editor_script_changed">
  77. <argument index="0" name="script" type="Script" />
  78. <description>
  79. Emitted when user changed active script. Argument is a freshly activated [Script].
  80. </description>
  81. </signal>
  82. <signal name="script_close">
  83. <argument index="0" name="script" type="Script" />
  84. <description>
  85. Emitted when editor is about to close the active script. Argument is a [Script] that is going to be closed.
  86. </description>
  87. </signal>
  88. </signals>
  89. <constants>
  90. </constants>
  91. </class>