Commit graph

280 commits

Author SHA1 Message Date
Rémi Verschelde
de7b6d13eb
Merge pull request #51627 from mhilbrunner/todo-for-neikeq 2021-08-18 20:13:50 +02:00
Rémi Verschelde
aa3909cf54
Merge pull request #51729 from yjh0502/ext-reload-master
Auto-reload scripts with external editor
2021-08-17 19:42:44 +02:00
Max Hilbrunner
5161c97c9c Remove underscore hacks
Way less cruft. :)

Co-authored-by: Ignacio Roldán Etcheverry <neikeq@users.noreply.github.com>
2021-08-17 16:10:28 +02:00
Haoyu Qiu
16c2d4ef22 Improve Undo/Redo menu items
* Make Undo/Redo menu items disabled when clicking it does nothing.
    * Context menu of `TextEdit`
    * Context menu of `LineEdit`
    * Editor's Scene menu
    * Script editor's Edit menu and context menu (for Script and Text)
* Make editor undo/redo log messages translatable.
* Mark `UndoRedo`'s `has_{un,re}do()` methods as `const`.
* Expose `TextEdit`'s `has_{un,re}do()` to scripts since `{un,re}do()` are already available.
2021-08-17 21:11:10 +08:00
Jihyun Yu
1c61245990 Auto-reload scripts with external editor 2021-08-17 21:43:45 +09:00
Paulb23
bcfc591f86 Reorganise text editor settings 2021-08-16 17:18:49 +01:00
Rémi Verschelde
81512a3732
Style: Cleanup code using text_editor/completion/use_single_quotes 2021-08-13 21:27:57 +02:00
Haoyu Qiu
dae51cc6b3 Allow dropping property path into script editor 2021-08-13 23:04:48 +08:00
Paulb23
ae4dcb8918 Cleanup and bind remaing methods in TextEdit 2021-08-12 11:43:35 +01:00
Paulb23
b700011314 Protect internal CodeEdit --> TextEdit API 2021-08-12 09:29:58 +01:00
Paulb23
9ec3e7f3d7 Cleanup TextEdit selection methods 2021-08-12 09:29:56 +01:00
Paulb23
d5dcaee4c5 Cleanup and rename caret operations 2021-08-12 09:29:13 +01:00
Aaron Franke
fa3a32a2d6
Use Key enum instead of plain integers 2021-08-10 16:26:55 -05:00
Bhuvan Vemula
a0a019a998 Added EditorCommandPalette 2021-08-09 17:41:50 +05:30
Paulb23
809a32c045 Clean up and complete CodeEdit inspector and docs 2021-08-01 12:24:19 +01:00
Paulb23
dd5a37f556 Move symbol lookup into CodeEdit 2021-08-01 12:06:33 +01:00
Paulb23
12f0053555 Move auto brace completion to CodeEdit 2021-08-01 12:06:33 +01:00
Rémi Verschelde
ac3322b0af
Use const references where possible for List range iterators 2021-07-25 12:22:25 +02:00
Aaron Franke
4e6efd1b07
Use C++ iterators for Lists in many situations 2021-07-23 17:38:28 -04:00
Rémi Verschelde
dfc1ec7fb9
Merge pull request #50606 from Chaosus/textedit_fix_guttertype
Fixed typos in `TextEdit::GutterType` enum
2021-07-19 16:40:42 +02:00
Yuri Roubinsky
1597045b09 Fixed typos in TextEdit::GutterType enum 2021-07-19 11:18:54 +03:00
reduz
6631f66c2a Optimize StringName usage
* Added a new macro SNAME() that constructs and caches a local stringname.
* Subsequent usages use the cached version.
* Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time.
* Replaced all theme usages by this new macro.
* Replace all signal emission usages by this new macro.
* Replace all call_deferred usages by this new macro.

This is part of ongoing work to optimize GUI and the editor.
2021-07-18 21:20:02 -03:00
kobewi
5e593dda9b Support single quote when dropping files to script 2021-07-03 13:03:20 +02:00
Rémi Verschelde
d41f4aca77
Script editor: Rename 'Clone Down' to 'Duplicate Selection'
Fixes #36670.
2021-06-29 12:14:24 +02:00
Paulb23
1a0cfc219b Move indent management to CodeEdit 2021-06-20 20:00:54 +01:00
Lightning_A
e28fd07b2b Rename instance()->instantiate() when it's a verb 2021-06-19 20:49:18 -06:00
Rémi Verschelde
60dcc4f39c
Merge pull request #49742 from Paulb23/remove_keywords_textedit
Remove redundant keywords from TextEdit
2021-06-20 00:39:18 +02:00
Paulb23
ab49ea032c Remove redundant keywords from TextEdit 2021-06-19 13:56: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
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
kobewi
7ff135b015 Consistently prefix bound virtual methods with _ 2021-06-12 00:55:52 +02: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
680dc9e81a Add comment and string tracking to CodeEdit 2021-06-01 15:38:45 +01:00
kobewi
4bee21bcc4 Add preload() to resource path when holding Ctrl 2021-05-27 12:22:32 +02:00
Hugo Locurcio
80f4e407b2
Add a keyboard shortcut to select the word under cursor in TextEdit
This also acts as a general-purpose "deselect" shortcut since pressing
it a second time will deselect text.

This is available both in the script editor and in TextEdit fields
in use, both in the editor and projects.

The Duplicate Line script editor shortcut was moved to Ctrl + Shift + D
since it conflicts with the new shortcut (Ctrl + D). The rationale for
doing so is that Duplicate Line is a less commonly used action, and
its behavior can be replicated by copying and pasting the current line
anyway. (With no selection active, the whole line will be copied.)
2021-05-22 23:47:43 +02:00
Paulb23
00e10a842f Add custom background line colour to TextEdit and remove marked lines 2021-05-22 14:41:55 +01:00
Rémi Verschelde
37c3b33253
Merge pull request #48605 from sent44/scripteditor_get_codeedit
Add `get_base_editor` to `ScriptEditorBase`
2021-05-16 23:06:01 +02:00
sent44
2b30728ebf Add get_base_editor to ScriptEditorBase 2021-05-15 18:47:00 +07:00
llschuster
6b55ec2ca9 text-editor: fix Clicking warning doesn't center around line 2021-05-13 17:07:39 +02:00
Kongfa Waroros
6294507acb Add Various ColorPicker shapes 2021-04-06 22:48:03 +07:00
Kyle
2b775bd698 Fixes ctrl-click function line centering
When ctrl-clicking in the code editor, the view will now be centered on the function result.

Also replaces a circumstance where goto_line_centered should be used.
2021-03-24 12:29:14 -04:00
Aaron Franke
10d7fccb54
Rename ButtonList enum and members to MouseButton 2021-03-23 07:13:23 -04:00
Eric M
49714b0963 Removed hardcoded shortcuts from /scene and converted to input actions
This removes hardcoded actions from things like LineEdit and TextEdit.

Previously, things like copy, paste, etc were all hardcoded to Ctrl+C, Ctrl+V, etc. They could not be changed. This allows the possibility of them being changed, by making them use the action map. This has the added benefit of greatly simplifying the input handling logic in those controls. The logic which was previously in a huge and hard to follow switch statement has been extracted to individual methods.
2021-02-18 16:22:51 +01:00
reduz
f8d03b98e7 Improve resource load cache
-Added a new method in Resource: reset_state , used for reloading the same resource from disk
-Added a new cache mode "replace" in ResourceLoader, which reuses existing loaded sub-resources but resets their data from disk (or replaces them if they chaged type)
-Because the correct sub-resource paths are always loaded now, this fixes bugs with subresource folding or subresource ordering when saving.
2021-02-11 15:44:28 -03:00
Marcel Admiraal
8eb39f4e8b Change themes *_color_* to *_*_color
Changed:
font_color_accel -> font_accelerator_color
font_color_bg -> font_unselected_color
font_color_disabled -> font_disabled_color
font_color_fg -> font_selected_color
font_color_hover -> font_hover_color
font_color_hover_pressed -> font_hover_pressed_color
font_color_pressed -> font_pressed_color
font_color_readonly -> font_readonly_color
font_color_selected -> font_selected_color
font_color_shadow -> font_shadow_color
font_color_uneditable -> font_uneditable_color
icon_color_disabled -> icon_disabled_color
icon_color_hover -> icon_hover_color
icon_color_hover_pressed -> icon_hover_pressed_color
icon_color_normal -> icon_normal_color
icon_color_pressed -> icon_pressed_color

Also includes:
font_outline_modulate -> font_outline_color
tab_fg -> tab_selected
tab_bg -> tab_unselected
2021-01-24 06:28:49 +00: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