Commit Graph

395 Commits

Author SHA1 Message Date
kobewi aeec3c1309 Add methods to add submenus without using names 2024-02-22 15:13:53 +01:00
kobewi a031911c82 Use check_changed_settings_in_group() everywhere 2024-02-19 21:34:45 +01:00
passivestar c2a4a0d4cb Fix `LineEdit` delete all the way to the left/right when something is selected 2024-02-18 11:58:37 +04:00
Rémi Verschelde 21f0529aa9
Revert "Update Node::get_configuration_warnings signature"
This reverts commit d3852deaa4.
2024-02-17 19:03:21 +01:00
Rémi Verschelde 768ab25562
Merge pull request #88057 from passivestar/cmd-backspace-lineedit
Fix LineEdit behavior for deleting all the way to the left/right
2024-02-13 17:24:18 +01:00
RedMser d3852deaa4 Update Node::get_configuration_warnings signature 2024-02-08 23:05:20 +01:00
passivestar 2c0d0c1473 Fix LineEdit behavior for deleting all the way to the left/right 2024-02-07 16:29:32 +04:00
Rémi Verschelde 3482da422d
Merge pull request #87012 from TheSofox/line-edit-undo-caret-fix
Fix `LineEdit` caret rendering/positioning on Undo.
2024-01-15 13:27:02 +01:00
Sofox 6888d957dc Fix LineEdit caret rendering/positioning on Undo. 2024-01-09 17:14:55 +00:00
kobewi 0e8f90f4c8 Update deferred calls to use Callables 2024-01-09 16:11:47 +01:00
Rémi Verschelde 50a073cb0e
Merge pull request #86732 from TheSofox/line-edit-delete-fix
Make `LineEdit` scrolling show as much text as possible
2024-01-04 14:26:30 +01:00
Sofox 8661667dde Make LineEdit scrolling show as much text as possible 2024-01-04 04:13:35 +00:00
Mateus Reis cab48493d8 Fix double text_changed signal when overwriting selection in LineEdit
The part of gui_input that handles unicode wasn't checking
text_changed_dirty before emitting the signal, unlike the rest of the text editing functions.

Fixes #86451
2023-12-24 14:23:01 +02:00
bruvzg 56579f397d
[Text Overrun] Add option to set custom ellipsis character, add support for system font fallback. 2023-12-04 08:21:42 +02:00
BlueCube3310 bd67e0a0bc Change dropdown type filter to Texture2D in certain nodes 2023-10-28 17:39:47 +02:00
jsjtxietian 6950aab078 Make LineEdit secret character easier to change and enter
1. Allow values longer than 1 character in the property,
    but trim characters after the first one.
2. Allow empty strings, this acts like if a space was used as a secret character,
    so that an error isn't printed when you erase all characters in the property.
2023-10-19 21:32:38 +08:00
kobewi 1fee40a189 Accept cancel event when unfocusing LineEdit 2023-10-06 16:00:56 +02:00
Rémi Verschelde 3075e4ef1d
Merge pull request #82811 from MewPurPur/more-line-edit-organization
Place LineEdit secret in its own section
2023-10-06 12:52:58 +02:00
MewPurPur dc2e0aab6f Place LineEdit secret in its own section 2023-10-04 22:41:45 +03:00
ajreckof 6afadbaa9f Replace Ctrl in editor shortcuts with Cmd or Ctrl depending on platform 2023-09-19 10:29:07 +02:00
Rémi Verschelde d08401236c
Merge pull request #81312 from YuriSizov/theme-static-binds
Register theme properties with ThemeDB
2023-09-11 15:38:06 +02:00
Yuri Sizov 2924bfd4d3 Register theme properties with ThemeDB 2023-09-11 13:45:23 +02:00
kobewi db4daa5249 Fix FindReplaceBar losing focus too early 2023-09-08 14:46:34 +02:00
bruvzg 6a1fdc213c
[LineEdit] Update line edit offset on text delete. 2023-09-08 08:58:51 +03:00
kobewi e21c30ec11 Unfocus LineEdit when pressing Escape 2023-08-29 14:53:49 +02:00
bruvzg 5453503697
[Text Server] Store extra spacing of individual font variations. 2023-08-24 11:58:12 +03:00
bruvzg 5d3fcc5766
[TextServer] Fix system font fallback and caret/selection behavior for composite characters. 2023-08-15 11:42:40 +03:00
unknown cfe98c57b9 Add drag and drop option for line edit and rich text label 2023-07-19 22:18:34 -04:00
kobewi 968c5f6247 Preserve selection when focusing SpinBox 2023-06-10 21:29:24 +02:00
Igorrreha d8886e1a0c Fix LineEdit expanding to text length
Fix for issue #77474

Remove wrong tab

Change the comment to more relevant

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2023-05-26 23:42:03 +07:00
Yuri Sizov de416c5cbd
Merge pull request #74623 from MewPurPur/edit-text-with-style
Code style improvements to text_edit and related
2023-04-17 19:08:08 +02:00
bruvzg d904516e55
[TextServer] Use dedicated flag for object replacement characters. 2023-04-12 10:08:51 +03:00
VolTer f587a21899 Code style improvements to text_edit and related 2023-04-08 19:33:56 +02:00
VolTer 1856ceeb76 Implement LineEdit.get_selected_text() 2023-03-30 22:58:12 +02:00
kobewi 36141dc469 Fix get_drag_data not overridable in some Controls 2023-03-20 21:42:13 +01:00
bruvzg 3ca3ee36ab
Fix IME position in the single window mode sub-windows. 2023-03-06 10:08:55 +02:00
Rémi Verschelde 008cafc103
Merge pull request #72378 from maximkulkin/line-edit-consume-events
Fix LineEdit not consuming events
2023-02-10 15:08:28 +01:00
Maxim Kulkin 5adc7e397e Fix LineEdit not consuming events
The most important issue is LineEdit not consuming
"ui_text_submit" event which makes pressing Enter after
editing escape to other components causing unwanted
interactions.

Also fix handling mouse button interactions not consuming
some events.

Also implement early return in case we know which event
type it is and there is no point in checking other event
types.

PS I'm also suspicious that mouse motion events also need
to be consumed, but haven't explored those cases.
2023-02-03 14:38:12 -05:00
Marcus Brummer a54cb5b07b Always show caret when moving in LineEdit 2023-01-31 20:56:06 +01:00
Danil Alexeev af8bf6f1d0
Fix `LineEdit` and `TextEdit` context menus not customizable 2023-01-27 11:14:54 +03:00
bruvzg e08a6e692d
[Windows] Fix committing IME text without IME deactivation. 2023-01-26 09:24:12 +02:00
bruvzg daad4aed62
Cleanup and unify keyboard input.
- Unify keycode values (secondary label printed on a key), remove unused hardcoded Latin-1 codes.
- Unify IME behaviour, add inline composition string display on Windows and X11.
- Add key_label (localized label printed on a key) value to the key events, and allow mapping actions to the unshifted Unicode events.
- Add support for physical keyboard (Bluetooth or Sidecar) handling on iOS.
- Add support for media key handling on macOS.

Co-authored-by: Raul Santos <raulsntos@gmail.com>
2023-01-23 15:08:12 +02:00
Rémi Verschelde 5b1df48c6c
Convert en_GB spelling to en_US with codespell 2023-01-23 11:02:20 +01:00
Juan Linietsky 2b815df3c1 Use BitField<> in core type masks
* All core types masks are now correctly marked as bitfields.
* The enum hacks in MouseButtonMask and many other types are gone. This ensures that binders to other languages non C++ can actually implement type safe bitmasks.
* Most bitmask operations replaced by functions in BitField<>
* Key is still a problem because its enum and mask at the same time. While it kind of works in C++, this most likely can't be implemented safely in other languages and will have to be changed at some point. Mostly left as-is.
* Documentation and API dump updated to reflect bitfields in core types.
2023-01-08 22:17:40 +01:00
Rémi Verschelde d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
Lucas Laukka 4e63395a78 fixed bug showing only two digits in color picker 2022-12-07 13:55:51 +01:00
Rémi Verschelde 45c6950f1b
Merge pull request #67123 from Rindbee/improve-caret-draw-conditions-for-LineEdit
Improve caret drawing conditions for `LineEdit`
2022-12-05 18:06:50 +01:00
bruvzg c624b1eeac
[Line Edit] Ignore placeholder text when drawing caret. 2022-11-08 15:15:13 +02:00
Haoyu Qiu 3aed3edc06 Allow selecting SpinBox & LineEdit text when focus enters 2022-10-29 09:58:42 +08:00
bruvzg 4b1937c73f Abort LineEdit shaping if no font is set to avoid unnecessary error messages. 2022-10-14 12:57:42 +03:00