Commit graph

653 commits

Author SHA1 Message Date
Rémi Verschelde 8b7f582f22
Revert "solved ctrl + alt + special character Issue #6851" 2021-01-05 14:41:35 +01: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
Rémi Verschelde c4c211c3b7
Merge pull request #44605 from madmiraal/rename-control-margin
Rename Control margin to offset
2020-12-23 18:24:00 +01:00
Marcel Admiraal 4b8b803931 Rename Control margin to offset 2020-12-23 06:25:56 +00:00
bruvzg 1adea98d07
Use integer text position in scroll container, TextEdit and canvas editor, to ensure sharp text rendering.
Use integer font align/advance with any font scaling, to ensure sharp text rendering.
2020-12-21 07:49:27 +02:00
Sergey Minakov efeb9e4d08 GUI: use cursor in TextEdit for non selected text. 2020-12-16 05:41:14 +03:00
Yuri Roubinsky 2d4ef1c193 Fixed mouse scrolling in TextEdit's 2020-12-11 12:51:10 +03:00
bruvzg 644f739660
Static analyzer fixes:
Removes unused code in OS.
Fixes return types.
Fixes few typos.
2020-12-09 10:17:53 +02:00
bruvzg 0ef483e9a9
[Complex Text Layouts] Performance optimizations. 2020-12-07 08:53:02 +02:00
bruvzg a458e90179
[Complex Text Layouts] Adds missing Font::SPACING_* to the Label, LineEdit, TextEdit, TextLine and TextParagraph.
Fixes oversized editor control height (default editor spacing is negative) and control size changing when text is set.
2020-12-06 20:30:59 +02: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
Sergey Minakov 8894c64e54 GUI: send cursor data from TextEdit 2020-11-15 16:03:21 +03: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
Yuri Roubinsky c3df61a602 Removed redundant line from TextEdit
introduced in https://github.com/godotengine/godot/pull/43026
2020-10-28 12:56:20 +03:00
Devin Curry b9c35af15d ScriptEditor: Fix line number gutter drag select
Fixes issue #42722
2020-10-25 12:13:54 -07:00
Yuri Roubinsky 4c65dc975c Shows ColorRect in Color constants autocompletion 2020-10-23 19:03:50 +03:00
Dominik 'dreamsComeTrue' Jasiński 99c8a07919 TextEdit - fix valid bounds in 'set_line'. Fixes #41967 2020-10-17 17:59:15 +02:00
Paulb23 33ab9cd621 Move safe line color into editor 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 7829fdc1d0 Add folding gutter to code_edit 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 907f9f2a84 Changed line_edited_from(from) to lines_edit_from(from, to) 2020-09-10 20:35:28 +01:00
Paulb23 1353ed5e44 Added Line numbers to CodeEdit 2020-09-10 20:35:28 +01:00
Paulb23 c13d9eb6e5 Added gutter system to TextEdit 2020-09-10 20:35:28 +01:00
bruvzg 80b8eff6aa
[Complex Test Layouts] Change String to use UTF-32 encoding on all platforms. 2020-09-03 19:56:24 +03:00
Cheeseness 1f159306ed Skip indentation of empty lines when indenting a selection. 2020-08-14 23:53:34 +10:00
Rémi Verschelde 044b3d0ed3
Merge pull request #37769 from HellonLegs/master
solved ctrl + alt + special character Issue #6851
2020-08-14 13:03:07 +02:00
PouleyKetchoupp 095331fae4 Add option to disable virtual keyboard for TextEdit
Adding support for disabling virtual keyboard on mobile platforms, in
order to make it consistent with LineEdit.

It allows implementing a custom virtual keyboard.
2020-08-09 11:06:36 +02:00
Paulb23 51dd4792d7 Fix TextEdit line width cache not being updated 2020-07-29 21:42:38 +01:00
PouleyKetchoupp 8c05dadcff Fix Return key events in LineEdit & TextEdit on Android
Depending on the device implementation, editor actions could be
received with different action ids or not at all for multi-line.

Added a parameter to virtual keyboards to properly handle single-line
and multi-line cases in all situations.

Single-line:
Input type set to text without multiline to make sure actions are sent.
IME options are set to DONE action to force action id consistency.

Multi-line:
Input type set to text and multiline to make sure enter triggers new lines.
Actions are disabled by the multiline flag, so '\n' characters are
handled in text changed callbacks.
2020-07-26 20:06:07 +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
Juan Linietsky 438c380458 Add a separate application focus/in notification out from Window focus notification. 2020-06-30 10:40:06 -03:00
Stijn Hinlopen 5f7499beac No longer scroll vertically when scrollbars are unavailable 2020-06-20 20:56:17 +02:00
PouleyKetchoupp 242b94af1a TextEdit search returns a dictionary instead of Vector
Easier to use than accessing elements in a Vector using indices given by an enum.
Breaks compatibility on existing scripts using this functionality.
2020-05-16 23:46:14 +02:00
Marcus Brummer b048eb05ad Fixed text editor drawing if smooth scrolling is disabled.
Fixes #38778
2020-05-16 16:31:43 +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 07bc4e2f96 Style: Enforce separation line between function definitions
I couldn't find a tool that enforces it, so I went the manual route:
```
find -name "thirdparty" -prune \
  -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \
  -o -name "*.glsl" > files
perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files)
misc/scripts/fix_style.sh -c
```

This adds a newline after all `}` on the first column, unless they
are followed by `#` (typically `#endif`). This leads to having lots
of places with two lines between function/class definitions, but
clang-format then fixes it as we enforce max one line of separation.

This doesn't fix potential occurrences of function definitions which
are indented (e.g. for a helper class defined in a .cpp), but it's
better than nothing. Also can't be made to run easily on CI/hooks so
we'll have to be careful with new code.

Part of #33027.
2020-05-14 16:54:55 +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 6dfea347b0
Merge pull request #38655 from ice-blaze/minimap-shifted-selection-by-one-line#38532
Fix minimap selection offset
2020-05-12 18:02:21 +02:00
etienne.frank 72ab355945 Fix minimap selection offset
The minimap selection was shifted of 1 line too late.
2020-05-11 10:02:16 +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 d7b85fbaa1
Merge pull request #31086 from volzhs/underline
Use underline position and thickness value in font file
2020-05-07 21:18:41 +02:00
Rémi Verschelde b62218bbac
Merge pull request #38385 from ThakeeNathees/method-bind-text_edit-set_line
method bind TextEdit::set_line() added
2020-05-07 13:43:34 +02:00
Rémi Verschelde 4d50f747d5
Merge pull request #37293 from Janglee123/ctrl-click-improvements
Improved go-to definition (Ctrl + Click)
2020-05-05 16:49:15 +02:00
janglee be7a353c70 Improved go-to definition (Ctrl + Click)
Co-Authored-By: Bojidar Marinov <bojidar.marinov.bg@gmail.com>
2020-05-05 10:46:12 +05:30
Thakee Nathees b9acf1cedf method bind TextEdit::set_line() added 2020-05-01 18:37:12 +05:30
Rémi Verschelde f6e29addd4
Merge pull request #37846 from CaptainProton42/text-edit-undo-stack-size
Add "undo_max_stack_size" property to TextEdit
2020-04-29 15:56:08 +02:00