summaryrefslogtreecommitdiffstats
path: root/editor/plugins/script_editor_plugin.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add main_gutter (breakpoints, bookmarks, execution lines) to code_editPaulb232020-09-101-4/+3
|
* Properly disambiguate unsaved scriptsTomasz Chabora2020-07-311-2/+6
|
* Script editor: Fix crash when root script is nullRémi Verschelde2020-07-271-3/+3
| | | | Bug introduced in #40746.
* Script editor: Fix open dominant logic for language-specific external editorsRémi Verschelde2020-07-271-2/+6
| | | | | | Follow-up to #40735. Co-authored-by: Ignacio Etcheverry <ignalfonsore@gmail.com>
* Script editor: Don't open dominant script in external editorRémi Verschelde2020-07-261-15/+11
| | | | Fixes #13429.
* Make unsaved scripts in the script editor more user-friendlyAndrii Doroshenko (Xrayez)2020-07-261-7/+41
| | | | | | | | | | | | | | | Unsaved scripts were previously displayed with blank tabs, which are mostly a result of deleted or improperly moved scripts. This patch makes sure that those kind of scripts are displayed as "[unsaved]" now, and ensures that scripts are removed from the list while deleting scripts from the filesystem dock preventing the unsaved tabs to appear in the first place (a user is already prompted with "no undo" warning while deleting any file). A user is always prompted to save those "[unsaved]" scripts if they attempt to close them without saving in any case except as described above.
* Merge pull request #33760 from nekomatata/script-editor-init-optimizationRémi Verschelde2020-07-261-20/+41
|\ | | | | Optimized ScriptEditor initialization when many scripts are loaded
| * Optimized ScriptEditor initialization when many scripts are loadedPouleyKetchoupp2020-07-171-20/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This change avoids the editor to freeze for several seconds when a project with lots of scripts is loaded in the editor. It focuses on a few heavy operations previously executed on all previously loaded scripts: - Initialize script resource (script validation/parsing) only on focus - ScriptTextEditor: code editor and edit menu are added to the scene only on focus - Add to recent scripts only when opening new scripts (load/save scene metadata)
* | Skip internal scripts for breakpoints without printing an errorAndrii Doroshenko (Xrayez)2020-07-231-1/+3
| | | | | | | | | | | | | | | | | | | | This removes: ``` ERROR: get_breakpoints: Condition ' base.begins_with("local://") ``` while running a project with blank scripts caused by deleting or moving, or built-in scripts which are not yet saved within a scene on running a project.
* | Fix crash when closing a TextFilePaulb232020-07-161-1/+1
|/
* Merge pull request #40291 from hinlopen/dialog-sizeRémi Verschelde2020-07-151-5/+5
|\ | | | | Resize various dialogs
| * Resize dialogs (FileDialog, EditorFileDialog, Reparent, SceneTreeDialog and ↵Stijn Hinlopen2020-07-141-5/+5
| | | | | | | | resource depency dialogs).
* | Merge pull request #40268 from DanielZTing/masterRémi Verschelde2020-07-151-2/+2
|\ \ | |/ |/| Fix cancel/OK button order on macOS
| * Fix cancel/OK button order on macOSDaniel Ting2020-07-101-2/+2
| | | | | | | | | | The macOS platform convention regarding button order is cancel on left, OK on right.
* | Extract Syntax highlighting from TextEdit and add EditorSyntaxHighlighterPaulb232020-07-111-3/+166
| | | | | | | | | | | | | | | | - Extacted all syntax highlighting code from text edit - Removed enable syntax highlighting from text edit - Added line_edited_from signal to text_edit - Renamed get/set_syntax_highlighting to get/set_syntax_highlighter - Added EditorSyntaxHighligher
* | Expose Syntax highlighter for editor pluginsPaulb232020-07-111-7/+32
| |
* | Convert syntax highlighters into a resourcePaulb232020-07-111-2/+2
|/
* Do not try to save internal scriptsDaniel Ting2020-07-081-2/+5
| | | | Fixes #40175
* Merge pull request #39076 from rileylyman/editor_tab_namesRémi Verschelde2020-07-011-0/+13
|\ | | | | Implement filename disambiguation for scene tabs and script names
| * implement generic filename disambiguationrileylyman2020-06-261-0/+13
| | | | | | | | | | | | | | A static function is added to EditorNode which allows for filename disambiguation given a list of filenames and the corresponding list of absolute paths for those files. This function is then used to disambiguate scene and script tabs in the editor.
* | Make "Close and save changes?" actually saveDaniel Ting2020-06-301-1/+1
| | | | | | | | | | | | This fixes issue #39844, where the confirmation dialog when a user attempts to close an unsaved script did not actually save it even after clicking "Save."
* | Add a separate application focus/in notification out from Window focus ↵Juan Linietsky2020-06-301-1/+1
|/ | | | notification.
* Fix overlapping hotkey designations for save all scenes and save all scriptsBill2020-06-241-1/+1
|
* Remove ToolButton in favor of ButtonHugo Locurcio2020-06-191-5/+10
| | | | | | | | | | | ToolButton has no redeeming differences with Button; it's just a Button with the Flat property enabled by default. Removing it avoids some confusion when creating GUIs. Existing ToolButtons will be converted to Buttons, but the Flat property won't be enabled automatically. This closes https://github.com/godotengine/godot-proposals/issues/1081.
* Fix crash when creating new text file with no namePhischermen2020-06-091-1/+0
|
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-69/+135
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-218/+0
| | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
* Fix Soft Reload Script shortcut clash with Replace in FilesDominik 'dreamsComeTrue' Jasiński2020-05-011-1/+1
| | | | Fixes: #38362
* [Core] Rename linear_interpolate to lerpAaron Franke2020-04-291-1/+1
|
* Merge pull request #38235 from BigRed-118/help_tabs_shuffle_fixRémi Verschelde2020-04-291-0/+4
|\ | | | | Fixed shuffling editor help tabs
| * Fixed shuffling editor help tabsTom Evans2020-04-261-0/+4
| | | | | | | | | | | | | | | | The indexes for the ScriptEditorItemData entries were not getting updated after sorting. This would cause a page to be open but with a different tab selected. Whenever _update_script_names was called next, it would correct this indexing. Now we correct it immediately following the tab sort.
* | Rename InputFilter back to InputRémi Verschelde2020-04-281-2/+2
|/ | | | | | | | | | | | | | | | It changed name as part of the DisplayServer and input refactoring in #37317, with the rationale that input no longer goes through the main loop, so the previous Input singleton now only does filtering. But the gains in consistency are quite limited in the renaming, and it breaks compatibility for all scripts and tutorials that access the Input singleton via the scripting language. A temporary option was suggested to keep the scripting singleton named `Input` even if its type is `InputFilter`, but that adds inconsistency and breaks C#. Fixes godotengine/godot-proposals#639. Fixes #37319. Fixes #37690.
* Merge pull request #37012 from Calinou/reverse-builtin-script-namingRémi Verschelde2020-04-161-2/+4
|\ | | | | Tweak the built-in script naming for resources with custom names
| * Tweak the built-in script naming for resources with custom namesHugo Locurcio2020-03-131-2/+4
| | | | | | | | | | | | | | | | | | | | This makes the script name appear before the scene file name, which ensures it's always visible even if the list of scripts is too narrow to display the full name. This only impacts built-in scripts with custom resource names. Unnamed resources will still use `<scene_file>::<id>` naming in the list of scripts.
* | Remove Node.get_position_in_parent()Tomasz Chabora2020-04-061-1/+1
| |
* | Merge pull request #35720 from Calinou/remove-request-docs-buttonRémi Verschelde2020-04-021-12/+0
|\ \ | | | | | | Remove Request Docs button in the script editor due to various issues
| * | Remove Request Docs button in the script editor due to various issuesHugo Locurcio2020-04-021-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | The Request Docs button is partly responsible for layout overflow issues on narrow displays, such as #31133. It also tended to attract spam and low-effort issues that were difficult to act upon. A "Send Docs Feedback" menu option has been added to replace it.
* | | Replace NULL with nullptrlupoDharkael2020-04-021-25/+25
|/ /
* | Multiple changes to DisplayServerX11Mateo Kuruk Miccino2020-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Travis: Change x11 to linuxbsd - SCons: Change x11 plataform to linuxbsd - Plugins: Remove ; to avoid fallthrough warning - DisplayServerX11: Implement set_icon - DisplayServerX11: Fix X11 bug when a window was erased from windows map, all the changes from that erased windows are sending to the main window - DisplayServerX11: Reorder create_window commands - DisplayServerX11: Change every Size2 to Size2i and Rect2 to Rect2i where it belongs + More X11 fixes which have been integrated directly back into reduz's original commits while rebasing the branch.
* | Popups are now windows also (broken!)Juan Linietsky2020-03-261-25/+23
| |
* | Working multiple window support, including editorJuan Linietsky2020-03-261-12/+12
| |
* | Refactored input, goes all via windows now.Juan Linietsky2020-03-261-3/+3
| | | | | | | | Also renamed Input to InputFilter because all it does is filter events.
* | Added a Window node, and made it the scene root.Juan Linietsky2020-03-261-1/+1
| | | | | | | | Still a lot of work to do.
* | Effective DisplayServer separation, rename X11 -> LinuxBSDJuan Linietsky2020-03-261-3/+4
| |
* | Refactored Input, create DisplayServer and DisplayServerX11Juan Linietsky2020-03-261-1/+1
| |
* | Style: Set clang-format Standard to Cpp11Rémi Verschelde2020-03-171-6/+6
|/ | | | | | | | | | For us, it practically only changes the fact that `A<A<int>>` is now used instead of the C++03 compatible `A<A<int> >`. Note: clang-format 10+ changed the `Standard` arguments to fully specified `c++11`, `c++14`, etc. versions, but we can't use `c++17` now if we want to preserve compatibility with clang-format 8 and 9. `Cpp11` is still supported as deprecated alias for `Latest`.
* Threaded networking for editor debugger.Fabio Alessandrelli2020-03-081-1/+0
|
* Merge pull request #18020 from bruvzg/input_fix_non_latin_and_add_hw_scancodesRémi Verschelde2020-03-011-4/+4
|\ | | | | Fix non-latin layout scancodes on Linux, adds access to physical scancodes.
| * Rename `scancode` to `keycode`.bruvzg2020-02-251-4/+4
| | | | | | | | | | Add `physical_keycode` (keyboard layout independent keycodes) to InputEventKey and InputMap. Fix non-latin keyboard layout keycodes on Linux/X11 (fallback to physical keycodes).
* | Signals: Manually port most of remaining connect_compat usesRémi Verschelde2020-02-281-9/+5
| | | | | | | | | | | | | | | | It's tedious work... Some can't be ported as they depend on private or protected methods of different classes, which is not supported by callable_mp (even if it's a class inherited by the current one).