Commit Graph

361 Commits

Author SHA1 Message Date
Rémi Verschelde cb8f045de8
Merge pull request #49650 from KoBeWi/FindReplaceCrash
Fix crash with FindReplaceBar
2021-06-24 19:21:01 +02:00
kobewi 35a38717e2 Fix crash with FindReplaceBar 2021-06-24 15:38:29 +02:00
Lightning_A 899e5f8685 Rename `is_a_parent_of()` to `is_ancestor_of()` 2021-06-21 08:39:28 -06:00
Paulb23 1a0cfc219b Move indent management to CodeEdit 2021-06-20 20:00:54 +01:00
Eric M d0e78c86d7 Added support for scripts reporting multiple errors to ScriptTextEditor
Scripts can now report multiple errors to the scripting editors in the engine. UI elements were added to support multiple errors.
2021-06-19 22:20:30 +10:00
Rémi Verschelde bb4c464fec
Merge pull request #49258 from megalobyte/editor-fix
Fixes for documentation search
2021-06-17 02:25:41 +02:00
Rémi Verschelde 341cb8da31
Merge pull request #49238 from Paulb23/code_edit_code_folding
Move code folding into CodeEdit and hide line hiding API
2021-06-16 20:11:39 +02:00
Gregory Basile 8ab13f8ace Documentation search fixes
Updates rich_text_label so that the built-in documentation can be searched
Previously, it would only find the first result and would not select other results
Renames "_entered" functions to "_submitted"
2021-06-16 09:43:34 -07:00
kobewi da6aebeb4c Move FindReplaceBar out of CodeTextEditor 2021-06-08 23:23:07 +02:00
Paulb23 5c618dd03d Move code folding into CodeEdit and hide line hiding API 2021-06-01 17:07:01 +01:00
Paulb23 c1b9971ad8 Move and expose Code Hint in CodeEdit 2021-06-01 15:38:45 +01:00
Paulb23 1c16673798 Move and expose AutoComplete in CodeEdit 2021-06-01 15:38:45 +01:00
Paulb23 7860710d27 Fix FindReplaceBar text_change signal binding after replace all 2021-05-28 10:12:58 +01:00
Paulb23 00e10a842f Add custom background line colour to TextEdit and remove marked lines 2021-05-22 14:41:55 +01:00
Tomasz Chabora b1859510ab Change behavior of String.right 2021-05-20 23:07:57 +02:00
Lightning_A 97fecd1b69 Rename "Control" key to "Ctrl" and add "_pressed" suffix to all InputEventWithModifiers properties/methods 2021-05-07 14:00:50 -06:00
Marcel Admiraal 86822b187e Rename LineEdit caret_* properties getters and setters to match property 2021-04-17 12:41:23 +01:00
Sushi a4d5664858 Fix: Selection Only in Find/Replace now preserves selection 2021-04-07 16:38:22 +02:00
Rafał Mikrut 504bc5cc67 Fix crashes in *_input functions 2021-04-05 08:52:21 +02:00
Aaron Franke 10d7fccb54
Rename ButtonList enum and members to MouseButton 2021-03-23 07:13:23 -04:00
Rémi Verschelde b5334d14f7
Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆
2021-01-01 20:19:21 +01:00
Marcel Admiraal 5b937d493f Rename empty() to is_empty() 2020-12-28 10:39:56 +00:00
Marcel Admiraal 4b8b803931 Rename Control margin to offset 2020-12-23 06:25:56 +00:00
Rémi Verschelde 90bdba576a
Merge pull request #43742 from qarmin/editor_modules_default_values
Initialize class/struct variables with default values in platform/ and editor/
2020-12-08 15:53:42 +01:00
Marcel Admiraal df6b061dbb Rename CubeMesh BoxMesh 2020-12-05 11:48:26 +00:00
Rafał Mikrut e1811b689b Initialize class/struct variables with default values in platform/ and editor/ 2020-12-02 16:09:11 +01:00
Yuri Roubinsky d936201a05 Reversed Toggle Script Button icon 2020-11-30 17:33:42 +03:00
bruvzg 3be31c4960
[Complex Text Layouts] Refactor TextEdit and CodeEdit controls. 2020-11-26 14:25:50 +02:00
bruvzg 99666de00f
[Complex Text Layouts] Refactor Font class, default themes and controls to use Text Server interface.
Implement interface mirroring.
Add TextLine and TextParagraph classes.
Handle UTF-16 input on macOS and Windows.
2020-11-26 14:25:48 +02:00
Haoyu Qiu 87fb2bde0c Keep cursor relative position after multiline move 2020-11-11 18:29:32 +08:00
reduz 127458ed17 Reorganized core/ directory, it was too fatty already
-Removed FuncRef, since Callable makes it obsolete
-Removed int_types.h as its obsolete in c++11+
-Changed color names code
2020-11-07 20:17:12 -03:00
Paulb23 c0da97d29c Remove breakpoints from editor settings 2020-09-10 20:35:28 +01:00
Paulb23 d18a90b8f0 Move ConnectionGutter to editor code_editor 2020-09-10 20:35:28 +01:00
Paulb23 4d7df24d46 Add main_gutter (breakpoints, bookmarks, execution lines) to code_edit 2020-09-10 20:35:28 +01:00
Paulb23 1353ed5e44 Added Line numbers to CodeEdit 2020-09-10 20:35:28 +01:00
Paulb23 a0b409cb14 Add and convert editor to use CodeEdit 2020-09-10 20:35:27 +01:00
Rémi Verschelde 5700429e4e
Merge pull request #33760 from nekomatata/script-editor-init-optimization
Optimized ScriptEditor initialization when many scripts are loaded
2020-07-26 14:05:56 +02:00
George Marques aa09b4f85d
Reintroduce code completion 2020-07-20 11:38:40 -03:00
PouleyKetchoupp ccff2f2551 Optimized ScriptEditor initialization when many scripts are loaded
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)
2020-07-17 09:02:24 +02:00
Paulb23 bc4cee4458 Extract Syntax highlighting from TextEdit and add EditorSyntaxHighlighter
- 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
2020-07-11 17:09:58 +01:00
Paulb23 2f1080be9b Convert syntax highlighters into a resource 2020-07-11 15:26:58 +01:00
Yuri Sizov e94b8a6acc Improve null check in FindReplaceBar 2020-07-06 17:13:04 +03:00
Yuri Roubinsky 25cb5a42e0 Fix error label clicking in status bar for shader editor 2020-06-23 11:10:33 +03:00
Hugo Locurcio 31b7f02a29
Remove ToolButton in favor of Button
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.
2020-06-19 20:49:49 +02:00
Maganty Rushyendra 2be3a33cc3 Fix code editor Replace tool to work with 'Selection Only' option
Ensures that when the `Selection Only` option is selected, the Replace
tool replaces occurrences of the search phrase only within the selected
region, and in order of occurrence.
2020-06-16 22:09:46 +08:00
Maganty Rushyendra 91bdc77d47 Fix match count for whole word search in editor
Check if a match borders a new line char when incrementing match counts.
2020-06-15 11:39:36 +08:00
Maganty Rushyendra 2433287871 Fix whole word search slowdown in editor
Reduce repeated iteration through the full text
when counting the number of occurrences of whole
words while searching a file in the editor.
2020-06-12 17:43:50 +08:00
MrRevington 4641fb9ec4 FIX CodeTextEditor not respecting focus in _input 2020-05-22 17:32:15 +02:00
Rémi Verschelde 0ee0fa42e6 Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14 21:57:34 +02:00
Rémi Verschelde 0be6d925dc Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
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.
2020-05-14 16:54:55 +02:00
Rémi Verschelde e956e80c1f Style: clang-format: Disable AllowShortIfStatementsOnASingleLine
Part of #33027, also discussed in #29848.

Enforcing the use of brackets even on single line statements would be
preferred, but `clang-format` doesn't have this functionality yet.
2020-05-10 13:12:16 +02:00
Rémi Verschelde fdf58a5858 Rename InputFilter back to Input
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.
2020-04-28 15:19:49 +02:00
Rémi Verschelde e14464caeb
Merge pull request #37447 from ThakeeNathees/text-replace-empty-string-fix
replace selected text with empty string bug fixed
2020-04-06 11:28:42 +02:00
Thakee Nathees 2144eb05df replace selected text with empty string bug fixed
Fix: #37416
2020-04-06 07:30:20 +05:30
lupoDharkael 95a1400a2a Replace NULL with nullptr 2020-04-02 13:38:00 +02:00
Juan Linietsky 441f1a5fe9 Popups are now windows also (broken!) 2020-03-26 15:49:42 +01:00
Juan Linietsky 4758057f20 Working multiple window support, including editor 2020-03-26 15:49:40 +01:00
Juan Linietsky 8e6960a69e Refactored input, goes all via windows now.
Also renamed Input to InputFilter because all it does is filter events.
2020-03-26 15:49:39 +01:00
Juan Linietsky 4396e98834 Refactored Input, create DisplayServer and DisplayServerX11 2020-03-26 15:49:32 +01:00
Rémi Verschelde e2b66cacf7
Merge pull request #18020 from bruvzg/input_fix_non_latin_and_add_hw_scancodes
Fix non-latin layout scancodes on Linux, adds access to physical scancodes.
2020-03-01 23:00:42 +01:00
Rémi Verschelde 55396d6e06
Merge pull request #36621 from WizardOhio24/fix-wrong-selection-on-line-clone-down
Fix wrong selection on cloning a line down in the editor
2020-03-01 15:53:55 +01:00
Richard Menzies 28f74327be Fix wrong selection on cloning a line down in the editor 2020-02-29 16:29:48 +00:00
Rémi Verschelde f742dabafe Signals: Manually port most of remaining connect_compat uses
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).
2020-02-28 14:24:09 +01:00
Rémi Verschelde 01afc442c7 Signals: Port connect calls to use callable_mp
Remove now unnecessary bindings of signal callbacks in the public API.
There might be some false positives that need rebinding if they were
meant to be public.

No regular expressions were harmed in the making of this commit.
(Nah, just kidding.)
2020-02-28 14:24:09 +01:00
Rémi Verschelde 2d904d2f80
Merge pull request #36232 from Calinou/add-soft-line-length-guideline
Add a soft line length guideline to the script editor
2020-02-27 21:10:42 +01:00
bruvzg 1af06d3d46
Rename `scancode` to `keycode`.
Add `physical_keycode` (keyboard layout independent keycodes) to InputEventKey and InputMap.
Fix non-latin keyboard layout keycodes on Linux/X11 (fallback to physical keycodes).
2020-02-25 12:30:33 +02:00
Juan Linietsky 69c95f4b4c Reworked signal connection system, added support for Callable and Signal objects and made them default. 2020-02-20 08:24:50 +01:00
Tomasz Chabora b23f141ba4 Allow for continuous deletion/duplication of lines 2020-02-16 22:09:55 +01:00
Hugo Locurcio 3e4b508c3b
Add a soft line length guideline to the script editor
The default value is 80. The hard line length guideline's
default column has been moved to 100 to account for the new
soft line length guideline.

It can be disabled by setting its value to the same column as the
hard line length guideline.

This closes https://github.com/godotengine/godot-proposals/issues/347.
2020-02-15 03:02:40 +01:00
Rémi Verschelde 94bf1a8a9d
Merge pull request #36030 from dreamsComeTrue/fix-replace-text-entered
Allow using Enter key for replacing text in code editors
2020-02-14 07:23:49 +01:00
Juan Linietsky 3f335ce3d4 Texture refactor
-Texture renamed to Texture2D
-TextureLayered as base now inherits 2Darray, cubemap and cubemap array
-Removed all references to flags in textures (they will go in the shader)
-Texture3D gone for now (will come back later done properly)
-Create base rasterizer for RenderDevice, RasterizerRD
2020-02-11 11:53:26 +01:00
Dominik 'squ@ll' Jasiński 1adcd57377 Allow using Enter key for replacing text in code editors (also Shift + Enter works backwards)
Fixes issue #31762
2020-02-08 21:46:04 +01:00
Rémi Verschelde 67c3ce35bd
Merge pull request #33639 from YeldhamDev/replaced_label_location
Make the replaced results appear in the matches counter
2020-01-31 10:04:27 +01:00
Rémi Verschelde 40f0649e5b Fix typos with codespell
Using codespell 1.16.0.

See ab3bccdb78 for procedure.
2020-01-15 00:49:52 +01:00
Haoyu Qiu 9c229cb035 Fixes minimap width on HiDPI monitor 2020-01-11 19:36:20 +08:00
Rémi Verschelde a7f49ac9a1 Update copyright statements to 2020
Happy new year to the wonderful Godot community!

We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.

Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
2020-01-01 11:16:22 +01:00
Rémi Verschelde f7d8dd79e9
Merge pull request #34441 from KoBeWi/wrapping_things_up
Fix code editor not always centering to bookmarks
2019-12-22 12:34:03 +01:00
Yuri Roubinsky c89df816c1 Fix ScriptTextEditor encapsulation 2019-12-19 09:30:40 +03:00
Tomasz Chabora b8bbf5a55f Fix code editor not always centering to bookmarks 2019-12-18 21:58:47 +01:00
Yuri Roubinsky 9f223616f1 Updates toggle scripts switch tooltip (if user changed the shortcut) 2019-12-18 12:00:02 +03:00
Yuri Roubinsky 03928c5b36 Fix toggle scripts panel to allow using shortcut in other areas 2019-12-17 17:23:29 +03:00
Yuri Roubinsky bb7b614da1 Prevent showing toggle scripts panel switch in shader editor 2019-12-17 11:19:43 +03:00
Yuri Roubinsky dc0199989d Moves switch for show scripts panel from File menu to status bar 2019-12-15 16:56:28 +03:00
Haoyu Qiu 6eaec3d10d Fixes Delete Line doesn't delete first line in script
Also, match multi-line delete behavior in script with single line:

If there are four lines: A, B, C, D.

Before the change:

    Delete C: Cursor lands on D
    Delete B and C: Cursor lands on A

After the change:

    Delete C: Cursor lands on D
    Delete B and C: Cursor lands on D
2019-12-09 16:31:43 +08:00
Tomasz Chabora f4d0e598a7 Center Script Editor when jumping to bookmarks/breakpoints 2019-12-01 18:43:52 +01:00
Michael Alexsander 1c5cfb9bfd Make the replaced results appear in the matches counter 2019-11-15 09:48:58 -03:00
Yuri Roubinsky 0ec76d40b4 Fix incorrect error label color when switching from light to dark theme 2019-11-14 13:34:56 +03:00
Yuri Roubinsky facfae3671 Fix "matches" label color in light theme 2019-11-14 09:44:53 +03:00
lupoDharkael 6f32fc68e4 Code editor: select next occurrence after Replace 2019-10-14 13:59:26 +02:00
Michael Alexsander be865871f4 Fix text search bar not correctly switching from replacing to just searching 2019-10-01 10:06:03 -03:00
amakarenko 544c39d1e7 Fix editor infinit loop in search_prev
Fixes godotengine#31328
2019-09-02 15:15:55 +03:00
Cykyrios ed00313a0b Reorganize & rename text editor settings categories
Add Navigation category for scroll and minimap settings.
Rename Line Numbers category to Appearance.
Rename Open Scripts category to Script List.
Rename "Draw Minimap" setting to "Show Minimap" (this is more consistent with other settings).

Reorder settings by category in code_editor.cpp to match settings list
2019-09-01 13:33:37 +02:00
Paulb23 0cea72273f Add minimap to text_edit 2019-08-21 23:48:46 +01:00
Michael Alexsander Silva Dias 22e9544582 Fix matches result in the code search not appearing when the quantity is 0 2019-08-14 20:43:26 -03:00
Rémi Verschelde 1387c683d4
Merge pull request #31329 from KoBeWi/vscode_ftw
Tweak the behavior of search/replace bar
2019-08-14 11:42:18 +02:00
Rémi Verschelde fcec358840
Merge pull request #31355 from nekomatata/fix-select-prev-freeze
Fixed freeze on search previous
2019-08-13 20:47:45 +02:00
PouleyKetchoupp 6a842fbb6d Fixed freeze on search_prev (missing condition for searching from a previous result, now the same as search_next)
Fixes #31328
2019-08-13 19:42:42 +02:00
Tomasz Chabora 72c40c788f Tweak the behavior of search/replace bar 2019-08-13 17:18:13 +02:00
Michael Alexsander Silva Dias 95a8b2b5d9 Make the script search have a proper matches counter 2019-08-13 09:29:49 -03:00
Tomasz Chabora b1af799b16 Select found text in Script Editor 2019-08-02 15:00:26 +02:00
Hugo Locurcio 755689b0e9
Enable the script editor's "Auto Brace Complete" by default
This also adds a setting hint for the "Code Complete Delay" setting
and cleans up some duplicated default setting values.

This closes #30662.
2019-07-18 21:42:10 +02:00
Rémi Verschelde 59ad47961f i18n: Sync translation template with current source 2019-07-09 12:50:49 +02:00
Bojidar Marinov 862369f842
Display a count of matches when searching in the code editor
Fixes #14513
2019-07-08 20:33:04 +03:00
Rémi Verschelde c401639820
Merge pull request #30326 from Anutrix/replace-all-fix-for-now
Got replace-all working without breaking search
2019-07-05 09:44:11 +02:00
Geequlim 10cfd87414 Show icons for code completion options 2019-07-05 09:25:50 +08:00
unknown 2685d3324c Got replace-all working without breaking search 2019-07-05 02:13:03 +05:30
Geequlim ed7ed52151 Parse more informations for code completion 2019-07-04 14:00:14 +08:00
unknown a86329c41e Fixed search highlight when search text not found or empty 2019-06-27 22:44:14 +05:30
Dawid Wdowiak 0f14489ecb Center script line when double clicked on error in debugger 2019-06-23 15:58:07 +02:00
Rémi Verschelde e6f7875e24
Merge pull request #28787 from mitchcurtis/fix-28059
Script Text Editor: respect Move Down and Move Up shortcuts on macOS
2019-06-19 12:38:46 +02:00
Rémi Verschelde 0ac3687d6f
Merge pull request #28766 from pgoral/editor_validation_issue
Changing method signature in other class in not recognized in working…
2019-06-17 23:13:08 +02:00
Rémi Verschelde 971b5160c6
Merge pull request #29306 from qarmin/small_code_fixes
Small fixes to unrechable code, possibly overflows, using NULL pointers
2019-06-12 12:49:21 +02:00
Rémi Verschelde 7842f4ca5c
Merge pull request #29262 from DarknessCatt/issue-27476
Automatically add new line to scripts
2019-06-11 15:07:09 +02:00
qarmin 8245db869f Small fixes to unrechable code, possibly overflows, using NULL pointers 2019-06-03 21:52:50 +02:00
qarmin 392f6f89cd Fix memory leak in Text Editor and FileSystem Dock 2019-05-30 21:31:05 +02:00
Matheus Lima Cunha 7fbb6d986f Automatically add new line to scripts 2019-05-29 18:13:29 -03:00
Goral aabd9980d1 Changing method signature in other class in not recognized in working class in typed GDScript #28685 2019-05-29 22:27:16 +02:00
Rémi Verschelde 63e7d2db08
Merge pull request #28218 from KoBeWi/b00km4rk5
Add bookmarks for easier code navigation
2019-05-20 22:39:19 +02:00
Mitch Curtis 793b50651d Script Text Editor: respect Move Down and Move Up shortcuts on macOS
Handle shortcuts in CodeTextEditor::_input() so that we get them before its
text_editor's TextEdit::_gui_input() function does. If we don't, that
function will execute the following code:

				if (k->get_shift()) {
					_pre_shift_selection();
				}

    #ifdef APPLE_STYLE_KEYS
				if (k->get_command()) {

					cursor_set_line(0);
				} else
    #endif

So using Command+Shift+Up for the Move Up shortcut would just result in
selecting all text to the beginning of the document, rather than moving the
current line up.

Fixes #28059.
2019-05-09 21:08:43 +02:00
Tomasz Chabora 0bfcf8bc2f Add bookmarks for easier code navigation 2019-05-05 18:57:53 +02:00
miwanczuk fda3a568ef Issue-28355 - show spaces in editor 2019-04-30 14:57:48 +02:00
Rémi Verschelde 1ca65b5e26
Merge pull request #25751 from Calinou/faster-script-error-checking
Allow floating-point values in the idle parse delay editor setting
2019-04-30 13:47:52 +02:00
Hugo Locurcio 2041e21eb5
Allow floating-point values in the idle parse delay editor setting
This also makes value changes effective without having to restart
the editor.
2019-04-26 00:01:20 +02:00
Rikhardur Bjarni Einarsson 9bfa63496a Added a marker in text_edit that tells which row is executing. 2019-04-23 21:51:01 +01:00
Rémi Verschelde 22457b907e
Merge pull request #28234 from Paulb23/connection_info_on_script
Display connection information in the script editor
2019-04-22 11:52:13 +02:00
Paulb23 a6562cd004 Display connection information in the script editor 2019-04-20 13:13:54 +01:00
Paulb23 6ea253aa77 Restore script editor state between sessions 2019-04-13 13:07:12 +01:00
Hugo Locurcio 8a1c5a8390
Find the previous match in script editor when pressing Shift + Enter
This allows cycling through matches more efficiently.
2019-04-06 01:20:05 +02:00
Rémi Verschelde e5a310cd38
Merge pull request #25782 from hsandt/feature/fix-toggle-comment-indent
Feature/fix toggle comment indent
2019-03-16 11:17:47 -07:00
Chaosus 7bb449ae70 Updates error label font in status bar 2019-03-01 11:48:36 +03:00
Rémi Verschelde 1aadb9f454
Merge pull request #24574 from SeleckyErik/issue-21814
Made clone (CTRL+B) in code editor clone only the selection.
2019-02-16 19:24:28 +01:00
allkhor 0137ec3468 Hide the warnings panel when no warnings presents. 2019-02-13 17:01:21 +06:00
Michael Alexsander Silva Dias 4fd7115e13 General cleanup of script and doc search bars 2019-02-10 14:18:08 -02:00
Rémi Verschelde 5e837b3f13
Merge pull request #25552 from groud/better_error_message
Displays errors and warnings in a better way in the script editor
2019-02-08 17:03:55 +01:00
hsandt 49b4faf43a [Code Editor] Fixed toggle_inline_comment moving cursor position by 1 even with longer delimiter like "//" 2019-02-04 20:23:48 +01:00
hsandt 5165a90ef6 [Script Editor] Refactored ScriptTextEditor::_edit_option by extracting EDIT_TOGGLE_COMMENT case
CodeEditor::toggle_inline_comment is now used by both ScriptTextEditor and ShaderEditor
2019-02-04 20:21:08 +01:00
Gilles Roudière 5f981d7fef Displays errors and warnings in a better way in the script editor 2019-02-01 17:20:59 +01:00
Marc Gilleron ae9a23e36c Moved script editor search bar to the bottom, so it doesn't shift everything down 2019-01-31 16:44:40 +01:00
Rémi Verschelde b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
Erik 4f5f868b8a Made clone (CTRL+B) in code editor clone only the selection.
In code editor, when code is selected, cloning (CTRL+B) now clones only the selected code. The code is cloned to
the end of selection. The previous behaviour was to clone the full line which the selection "touches" to the new
line after the end of selection.
2018-12-25 15:52:38 +01:00
Chaosus 260b5818f1 Change LinkLabel back to Label in error status bar 2018-12-21 11:39:54 +03:00
Rémi Verschelde 1039ba9ffb EditorSettings: Remove enable_code_completion_delay
It was badly named (it disables code completion, not just the delay), and also
badly implemented (not preventing the timer for running, but just preventing it
to show the autocompletion).

It could be readded with a proper name and cleaner implementation if there's an
actual need for it.

Supersedes #24407 and closes #24352.
2018-12-18 10:06:38 +01:00
Rémi Verschelde 2f31d31c23
Revert "Use more subtle indentation guides in the script editor" 2018-12-13 19:57:34 +01:00
Rémi Verschelde 3a312dbd32
Merge pull request #20725 from Calinou/textedit-subtle-indent-guides
Use more subtle indentation guides in the script editor
2018-12-09 23:10:32 +01:00
Rémi Verschelde aa08ef2bed
Merge pull request #23924 from Kanabenki/font-size-update
Display font size with zoom in code editor and refresh on settings change
2018-11-28 10:39:56 +01:00
Kanabenki 9dc15bae7c Display font size with zoom in code editor and refresh on settings change 2018-11-22 16:22:55 +01:00
Chaosus 1129d83272 Allows user to click on error line to jump into error. 2018-11-22 11:55:36 +03:00
Paulb23 6c54cb8bff Fix clone line undo history and extra new line, issue 21811 2018-11-04 18:33:16 +00:00
Paulb23 d47b20acae Fixed delete line being off by one, issue 22819 2018-10-13 18:30:23 +01:00
Hugo Locurcio 9c1d4f9da2
Use more subtle indentation guides in the script editor 2018-10-03 00:00:25 +02:00
Poommetee Ketson e74876028e Fix find-in-files and go-to-line dialog (partially) 2018-09-18 22:07:13 +07:00
DualMatrix e10ca7b824 Fixed clicking on Find/Replace doesn't set the focus on the text field
Fixed clicking on Find/Replace doesn't set the focus on the text field
2018-09-18 00:10:23 +02:00
Rémi Verschelde 277b24dfb7 Make core/ includes absolute, remove subfolders from include path
This allows more consistency in the manner we include core headers,
where previously there would be a mix of absolute, relative and
include path-dependent includes.
2018-09-12 09:52:22 +02:00
Rémi Verschelde 52466d57e9 Make some debug prints verbose-only, remove others 2018-08-24 14:59:01 +02:00
Rémi Verschelde 8cbd090249
Merge pull request #20670 from Calinou/script-editor-zoom-hidpi
Fix zoom display in the script editor on hiDPI displays
2018-08-13 12:22:58 +02:00
George Marques eb48119821
Added system for GDScript warnings
- Count and panel per script.
- Ability to disable warnings per script using special comments.
- Ability to disable warnings globally using Project Settings.
- Option to treat enabled warnings as errors.
2018-08-10 16:00:47 -03:00
Hugo Locurcio cbe9597021
Fix zoom display in the script editor on hiDPI displays 2018-08-02 11:41:29 +02:00
Hein-Pieter van Braam 0e29f7974b Reduce unnecessary COW on Vector by make writing explicit
This commit makes operator[] on Vector const and adds a write proxy to it.  From
now on writes to Vectors need to happen through the .write proxy. So for
instance:

Vector<int> vec;
vec.push_back(10);
std::cout << vec[0] << std::endl;
vec.write[0] = 20;

Failing to use the .write proxy will cause a compilation error.

In addition COWable datatypes can now embed a CowData pointer to their data.
This means that String, CharString, and VMap no longer use or derive from
Vector.

_ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug
builds. This is a lot faster for Vector in the editor and while running tests.
The reason why this difference used to exist is because force-inlined methods
used to give a bad debugging experience. After extensive testing with modern
compilers this is no longer the case.
2018-07-26 00:54:16 +02:00
Paulb23 765d6752bb Refactored text manipulation into CodeTexteditor 2018-07-22 11:48:59 +01:00
Max Hilbrunner c488a74e0c
Merge pull request #19498 from guilhermefelipecgs/fix_regression
Fix "find and replace" initializing with wrong size
2018-07-05 04:23:18 +02:00
Guilherme Felipe 5bae3693bf Fix "find and replace" initializing with wrong size
Fix the code editor outside the allowed limits.
2018-06-13 14:08:04 -03:00
Gabriel Gavilan b7b63fe034 Improve breakpoints and breakpoint gutter API in TextEdit
Added breakpoint_gutter, is_breakpoint_gutter_enabled, set_breakpoint_gutter_enabled, get_breakpoints, remove_breakpoints.
Fixed breakpoint_toggled signal not fierd when text is edited.
Fixes #18026.
2018-05-30 14:39:44 +02:00
volzhs 592ff9bb9d Add margin bottom with find/replace bar on script editor 2018-05-16 16:31:40 +09:00
Ian e1fff4bc09 TextEdit word wrap 2018-05-14 16:17:48 -04:00
RaphaelHunter eeb0534426 Fix:code editor text size should change at least one each time, don't mind how you setting your display scale 2018-05-07 17:50:44 +08:00
Unknown 4e26e5e268 Script Editor now displays positional column
This solves #17931 and makes the script editor consistent with other text editors(Sublime, Gedit, Vim) in displaying the position rather than the raw number of characters.
2018-05-03 18:03:20 +01:00
Crazy-P efd413916e Fixes replace all not replacing the first word 2018-03-25 15:39:37 +08:00
Rémi Verschelde f163b0e4b4
Merge pull request #16241 from Chaosus/zoomlabel
Added zoom label to code editor
2018-02-19 21:35:11 +01:00
Chaosus 42fccfb0a5 Maked status bar label fonts updateable 2018-02-14 18:17:59 +03:00
Chaosus 1ca122c771 Added zoom label to code editor 2018-01-31 18:18:21 +03:00
volzhs e96a808756 Fix find/replace bar
- make LineEdit resizable for find/replace
- move replaced count/no match message to status bar
- fix replaced n occuurence message is not displayed when n > 0

Fixes #15394
2018-01-18 09:08:01 +09:00
Gilles Roudiere c318cdad66 Remove the unused FindReplaceDialog class 2018-01-14 16:23:01 +01:00
volzhs 797147bd4b Set source code font with ttf, otf
renamed interface/editor/custom_font to interface/editor/main_font
moved text_editor/theme/font to interface/editor/code_font
renamed interface/editor/font_size to interface/editor/main_font_size
renamed interface/editor/source_code_size to interface/editor/code_font_size
2018-01-08 05:12:39 +09:00
Rémi Verschelde e4213e66b2 Add missing copyright headers and fix formatting
Using `misc/scripts/fix_headers.py` on all Godot files.
Some missing header guards were added, and the header inclusion order
was fixed in the Bullet module.
2018-01-05 01:22:23 +01:00
Rémi Verschelde cdcf2e7e1c
Merge pull request #15126 from poke1024/code-editor-autowrap-error
Make code editor's error display autowrap
2018-01-03 13:47:43 +01:00
Bernhard Liebl a4fab0ab42 Make code editor's error display autowrap 2018-01-03 12:41:11 +01:00
Rémi Verschelde b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
Bernhard Liebl 80ad8afc85 Native pan and zoom for macOS 2017-11-21 09:11:39 +01:00
Ian 1e59169d2d scrolling fixes 2017-11-18 20:07:53 -05:00
Ian d350f506a0 TextEdit code folding 2017-11-17 21:49:43 -05:00
Paulb23 45670df354 Added setting to toggle current line highlighting 2017-10-22 13:42:08 +01:00
Poommetee Ketson 34ea271380 Merge pull request #11646 from djrm/pr_visual_improvements
Several visual improvements.
2017-10-02 23:49:44 +07:00
Poommetee Ketson ef643690c3 Merge pull request #11661 from mhilbrunner/issue-11616-always-validate
Editor: Run validation on every text change, not only inserts
2017-10-02 23:48:02 +07:00
mhilbrunner cfd75f7a4e Editor: Run validation on every text change, not only inserts 2017-09-30 00:48:16 +02:00
Andreas Haas 20eb17a685
EditorSettings: Move interface/ properties to interface/editor
Fixes inconsistent behaviour where clicking on the "Interface"
in the Editor Settings wouldn't collapse the category as is the
case for all the other categories.
2017-09-29 18:52:56 +02:00
Daniel J. Ramirez 15986ea343 Several visual improvements.
Added proper label sizing
Improved text editor status bar
Fixed some issues with ItemList and also some style fixes
Added background to color picker samples (the mrcdk fix)
Fixed slider ticks.
Added VS breakpoint and error styleboxes.
2017-09-28 15:00:43 -05:00
Daniel J. Ramirez 541c4bfd6e Fix missing code editor find and replace missing hover icon. 2017-09-25 23:40:22 -05:00
letheed 5ad9be4c24 Rename pos to position in user facing methods and variables
Rename user facing methods and variables as well as the corresponding
C++ methods according to the folloming changes:

* pos -> position
* rot -> rotation
* loc -> location

C++ variables are left as is.
2017-09-20 13:11:10 +02:00
Rémi Verschelde ecd226c6a7 Merge pull request #11422 from poke1024/fixsourcefontsize2
Better script code font size rescaling on retina displays
2017-09-20 09:32:49 +02:00
poke1024 d2536a0cf1 better script code font size rescaling on retina displays 2017-09-19 19:51:38 +02:00
Paulo Gomes 9b72f08042 second take at autocomplete logic, using a TextOperation check. 2017-09-06 19:23:09 +01:00
Paulb23 d586b98a20 Added setting to toggle auto indent 2017-08-31 19:42:47 +01:00
toger5 7793bfc544 added icon updating to most ui elements 2017-08-30 21:47:09 +02:00
toger5 b2f70ca10c White Theme
- almost all the colors are generated now. They get adapted based on
   the theme color. All the correct icons are used
 - error label now uses error color
 - added missing button colors in editor theme
2017-08-30 21:44:48 +02:00
Rémi Verschelde bd282ff43f Use HTTPS URL for Godot's website in the headers 2017-08-27 14:16:55 +02:00
Rémi Verschelde b92c210b89 Code editor: Don't play hide and seek with error label 2017-08-26 14:43:20 +02:00
Juan Linietsky 36e0a72c77 -Code completion for enumerations
-Disabled GDNative and GDNativeScript so build compiles again
2017-08-24 00:06:56 -03:00
Rémi Verschelde df590fc2d3 Merge pull request #10340 from Rubonnek/remove-unnecessary-assignments
Removed unnecessary assignments
2017-08-22 00:58:12 +02:00
Wilson E. Alvarez 738d2ab969 Removed unnecessary assignments 2017-08-21 15:15:55 -04:00
Paulb23 d6599fde0a Increased smooth scroll speed and added user setting 2017-08-21 19:20:11 +01:00