Commit Graph

454 Commits

Author SHA1 Message Date
1aa2823fa3 Removed _change_notify
-For inspector refresh, the inspector now detects if a property change by polling a few times per second and then does update the control if so. This process is very cheap.
-For property list refresh, a new signal (property_list_changed) was added to Object. _change_notify() is replaced by notify_property_list_changed()
-Changed all objects using the old method to the signal, or just deleted the calls to _change_notify(<property>) since they are unnecesary now.
2021-02-10 19:31:24 -03:00
7961a1dea3 Initialize class variables with default values in scene/ [2/2] 2021-02-09 18:24:36 +01:00
eda5f4ea31 Merge pull request #44349 from KoBeWi/drop_the_data!
Allow to override drop data in LineEdit
2021-01-26 16:03:07 +01:00
bdfc7a6b40 Merge pull request #45369 from naithar/fix/line_edit_clear-4.0
[4.0] [GUI] Fix LineEdit clearing
2021-01-26 12:30:34 +01:00
ba6aa76992 [GUI] Enforce virtual keyboard redisplay on clear 2021-01-26 13:17:20 +03:00
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
8b7f582f22 Revert "solved ctrl + alt + special character Issue #6851" 2021-01-05 14:41:35 +01:00
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
5b937d493f Rename empty() to is_empty() 2020-12-28 10:39:56 +00:00
4b8b803931 Rename Control margin to offset 2020-12-23 06:25:56 +00:00
a3a31591b5 Allow to override drop data in LineEdit 2020-12-13 20:16:56 +01:00
644f739660 Static analyzer fixes:
Removes unused code in OS.
Fixes return types.
Fixes few typos.
2020-12-09 10:17:53 +02:00
0ef483e9a9 [Complex Text Layouts] Performance optimizations. 2020-12-07 08:53:02 +02:00
c3cc9d82b4 [Complex Text Layouts] Align glyph offsets and advances to the pixel grid. 2020-12-06 20:31:00 +02:00
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
d66eb77c9c [Complex Text Layouts] Refactor Label and LineEdit controls. 2020-11-26 14:25:49 +02:00
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
836b78f329 Update clear button when clicked 2020-11-25 00:42:07 +01:00
acb7d99fce Merge pull request #43449 from nekomatata/line_edit_window_pos
Expose LineEdit scroll offset to scripts
2020-11-11 13:18:55 +01:00
4775db1600 Expose LineEdit scroll offset to scripts 2020-11-11 10:07:31 +01:00
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
0a8c5845e3 Merge pull request #41870 from nekomatata/fix-line-edit-enter-regression
Fix LineEdit not consuming enter events
2020-09-08 11:14:33 +02:00
5c63dec36e Fix LineEdit not consuming enter events
LineEdit should not return early when processing KEY_ENTER, so it can
consume the event properly.

Regression introduced by mistake while fixing enter events for Android
(PR #40487 - c0b394572f)
2020-09-08 10:22:37 +02:00
80b8eff6aa [Complex Test Layouts] Change String to use UTF-32 encoding on all platforms. 2020-09-03 19:56:24 +03:00
7844775a76 Revert "Updated LineEdit to address #41278"
This reverts commit 71febfd6e2.
2020-09-01 14:04:37 +02:00
71febfd6e2 Updated LineEdit to address #41278
Updated set_max_length() function to actually pull a substring of the current text so it's not all thrown away when the new max length is shorter than the current length.
2020-08-26 11:19:24 -06:00
044b3d0ed3 Merge pull request #37769 from HellonLegs/master
solved ctrl + alt + special character Issue #6851
2020-08-14 13:03:07 +02:00
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
a30bac94cc Merge pull request #39737 from Cevantime/add_force_caret_displayed_to_line_edit
add force caret display to line edit
2020-07-23 18:02:51 +02:00
0aa56e3ab8 Add option to disable virtual keyboard for LineEdit
Co-authored-by: Alexander Holland <alexander.holland@live.de>
2020-07-22 08:19:05 +02:00
dc46bc8857 add force caret display to line edit 2020-07-15 13:00:25 +02:00
f0e320decf Fix some popups menu missing screen transform.
Closes #38591
2020-07-01 14:44:19 -03:00
438c380458 Add a separate application focus/in notification out from Window focus notification. 2020-06-30 10:40:06 -03:00
7433c9d40c [macOS] Command-backspace in line edit
Make command-backspace in line edit work like other macOS applications.

If there is a selection, command-backspace deletes the selection.

If there isn't a selection, command-backspace deletes from the cursor to the beginning of the line edit.

This addresses part of godotengine/godot#23548
2020-06-18 17:45:40 -04:00
2bb44ea5bd Make text deletion methods public for LineEdit 2020-06-10 22:16:48 +02:00
cc473b948f Fix Android LineEdit editing bugs 2020-05-16 17:55:27 +02:00
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
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
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
d8f8a3c606 Using the common behaviour when use command+shift on text line for osx
* On press left+command+shift or right+command+shift it should behave like shift+home or shift+end and select the text
* Using home and end events as reference
2020-05-11 10:25:07 +02:00
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
f412237f38 solved control + alt issue 2020-04-10 19:49:51 +02:00
95a1400a2a Replace NULL with nullptr 2020-04-02 13:38:00 +02:00
a6f3bc7c69 Renaming of servers for coherency.
VisualServer -> RenderingServer
PhysicsServer -> PhysicsServer3D
Physics2DServer -> PhysicsServer2D
NavigationServer -> NavigationServer3D
Navigation2DServer -> NavigationServer2D

Also renamed corresponding files.
2020-03-27 15:21:27 -03:00
15a9f94346 Add macOS DisplayServer implementation.
Change global menu to use Callable, add support for check items and submenus.
2020-03-26 16:24:05 +01:00
441f1a5fe9 Popups are now windows also (broken!) 2020-03-26 15:49:42 +01:00
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
9e08742de8 Added a Window node, and made it the scene root.
Still a lot of work to do.
2020-03-26 15:49:38 +01:00
f8a79a97c7 Effective DisplayServer separation, rename X11 -> LinuxBSD 2020-03-26 15:49:34 +01:00
4d7ab010db Merge pull request #37281 from ThakeeNathees/fix-project-manager-don't-consume-Enter
Fix: project manager don't consume Enter key #17620
2020-03-25 08:13:04 +01:00