Commit graph

4204 commits

Author SHA1 Message Date
Rémi Verschelde
ae5a962cc4
Merge pull request #61842 from bruvzg/popup_fixes_sw 2022-06-13 10:51:46 +02:00
bruvzg
ba6cb84d01
[RTL] Fix underline/overline/strikethrough interaction with the "visible characters" property. 2022-06-13 10:53:55 +03:00
bruvzg
f7269fe878
Single-window mode popups and edited scene windows fixes.
Fix single-window mode popup not closing when OptionBox is clicked.
Fix single-window mode submenus closing when parent menu item, that was used to open it is clicked (using same safe-area logic as platform specific code).
Disallow windows that are part of an edited scene from being set as exclusive or popup to prevent it from locking up the editor.
2022-06-13 09:56:08 +03:00
FireForge
4678736a39 Add suffixes to all nodes and resources 2022-06-11 09:41:05 -05:00
iwek
082cf5440e Fix setting line edit caret after dobule and triple click 2022-06-10 00:18:25 +02:00
bruvzg
906e9b6ac5
Add overrun behavior to the Button. 2022-06-08 19:02:27 +03:00
Rémi Verschelde
d52a79ad22
Merge pull request #59786 from V-Sekai/ok_color
Allow picking similar colours using OKHSL.
2022-06-07 20:52:32 +02:00
K. S. Ernest (iFire) Lee
1b776a6e7a Allow picking similar colours using OKHSL. 2022-06-07 05:53:27 -07:00
Rémi Verschelde
70757ad7df
Merge pull request #61726 from YeldhamDev/always_clear
Take into account the clear icon's size even when not visible in `LineEdit`s
2022-06-07 14:16:13 +02:00
bruvzg
fc77f983cb
[RTL] Stop processing thread before deleting scroll bar. 2022-06-06 23:46:22 +03:00
Rémi Verschelde
52952edafc
Merge pull request #61724 from iwek7/fixing_rich_text_label
Fix richTextLabel scroll showing
2022-06-06 10:39:39 +02:00
iwek
c179ba665a Fix richTextLabel scroll showing 2022-06-05 20:33:17 +02:00
Michael Alexsander
71c8fb26e0 Take into account the clear icon's size even when not visible in LineEdits 2022-06-05 15:13:19 -03:00
Rindbee
a14f7c4027 Fix strange behavior with list close tags and empty list tags
Fix the first two points in #61621.

Support for two  writing ways: compact or loose. The loose one is designed for easy editing in the editor.
For this, the first blank line (if exists) right after the list tags (`[ol]`, `[/ol]`, `[ul]`, and `[/ul]`)
will be ignored.

Make sure the empty list contains at least one item, that is, an empty list is ultimately a list with one item.
As a reminder here is a list.
2022-06-05 01:33:09 +08:00
Rémi Verschelde
52e36ab80e
Merge pull request #61631 from iwek7/redundant_min_call 2022-06-02 18:20:45 +02:00
iwek
848e759d88 Remove redundant min call when setting line 2022-06-02 15:52:09 +02:00
Hendrik Brucker
c6a39cd952 Fix enclosed nodes calculation of GraphEdit comment nodes 2022-06-02 13:14:46 +02:00
Yuri Sizov
ba273c6c5f Fix theme propagation for children of top level controls and windows 2022-06-01 04:20:00 +03:00
monkeyman192
5c29a7dbc5 Handle drawing of relationship lines better to take in to account invisible children 2022-06-01 00:23:33 +10:00
Rémi Verschelde
cf9aad63ba
Merge pull request #61453 from m3g4d1v3r/master
Fix #61444: Executing Tree.scroll_to_item crashes Godot
2022-05-31 12:28:50 +02:00
Rémi Verschelde
cea54a0357
Merge pull request #61489 from Rindbee/reset-buttons_visible-to-false-if-tabs-is-empty
Reset buttons_visible to false while tabs is empty in TabBar::_update_cache
2022-05-31 12:19:36 +02:00
Rémi Verschelde
a837accc5d
Merge pull request #61495 from timothyqiu/asymmetric-le
Fix LineEdit clear button for asymmetric stylebox
2022-05-31 08:55:21 +02:00
Hendrik Brucker
70c234f3e3 Improve Graphedit connection lines 2022-05-30 17:33:01 +02:00
Hendrik Brucker
771cb1261a Improve and fix the GraphNode port hotzones
Co-authored-by: Ansraer <jacky2611@gmail.com>
2022-05-30 15:48:58 +02:00
Haoyu Qiu
e021fc9419 Fix LineEdit clear button for asymmetric stylebox 2022-05-28 19:50:35 +08:00
Rindbee
a3b23f6b67 Reset buttons_visible to false while tabs is empty in TabBar::_update_cache 2022-05-28 12:54:45 +08:00
m3g4d1v3r
ee89c65b11 Add nullptr handling of argument pointer in Tree::scroll_to_item 2022-05-26 23:56:52 -03:00
monkeyman192
d4aa6e5366 Check visibility of items before drawing their relationship lines 2022-05-26 23:25:42 +10:00
Nathan Franke
2d14164bca
tree: always emit item_edited 2022-05-26 05:12:57 -05:00
Rémi Verschelde
2998be4f99
Merge pull request #60061 from monkeyman192/allow_treeitem_visible
Allow TreeItem nodes to toggle visibility
2022-05-24 10:53:41 +02:00
Rémi Verschelde
bd8d91254c
Merge pull request #61106 from snailrhymer/animation-library-fixes
Fix errors and improve UX relating to new animation libraries
2022-05-24 10:51:31 +02:00
Rémi Verschelde
65dd1bf023
Merge pull request #47665 from trollodel/tree_more_buttons_signals 2022-05-24 10:50:55 +02:00
Rémi Verschelde
9923851370 Fix typos with codespell
Using codespell 2.2-dev from current git.
2022-05-23 21:32:19 +02:00
Haoyu Qiu
4ac999cc3f Update last min size when Control becomes visible 2022-05-22 15:50:13 +08:00
trollodel
307427af89 Add the button pressed to some signals in Tree 2022-05-21 17:16:52 +02:00
reduz
45af29da80 Add a new HashSet template
* Intended to replace RBSet in most cases.
* Optimized for iteration speed
2022-05-20 22:40:38 +02:00
Rémi Verschelde
136da4d3bc
Merge pull request #61182 from danielkariv/fix_misclick_selection 2022-05-20 15:38:22 +02:00
Aaron Franke
5dc3bfb80e
Use suffixes for units in nodes and resources 2022-05-19 14:34:27 -05:00
Rémi Verschelde
b9bb3de6a1
Merge pull request #61142 from bruvzg/rtl_threaded 2022-05-19 14:27:48 +02:00
Aaron Record
900c676b02 Use range iterators for RBSet in most cases 2022-05-19 12:09:16 +02:00
Daniel Kariv
e6c909b489 add check for selection when try to push a meta.
Add a check for when we select a text but end on a link. Before it would act as if we just click an link, but now it changes it so if we click-drag over a link, we could select it (and not move to other page).
2022-05-19 11:55:14 +03:00
bruvzg
cfcdfc38e2
[RTL] Add support for shaping in background thread. 2022-05-19 09:34:44 +03:00
Rémi Verschelde
c0d189fbb8
Merge pull request #60955 from pfertyk/issue-60668-fix-get-breakpointed-lines-crash
Fix `get_breakpointed_lines` crashing Godot
2022-05-18 22:55:30 +02:00
Yuri Sizov
21b253a870 Define some Theme data structures with using for readability 2022-05-18 18:17:47 +03:00
Rémi Verschelde
5c79782c7e
Merge pull request #61088 from groud/keep_unhandled_events_on_pass 2022-05-17 23:50:55 +02:00
Rémi Verschelde
3ad751f7e0
Merge pull request #60867 from KoBeWi/μtext
Remove font height restriction from Button
2022-05-17 19:02:35 +02:00
Gilles Roudière
6db8b7616d Keep input event as unhandled if they go through a control set to MOUSE_FILTER_PASS 2022-05-17 15:41:58 +02:00
Rémi Verschelde
3506825930
Merge pull request #61112 from Chaosus/graph_edit_delete_nodes_param 2022-05-17 13:10:04 +02:00
Rémi Verschelde
ccdd85d8e7
Merge pull request #61001 from derammo/derammo_popup_conditional_hide 2022-05-17 12:56:53 +02:00
Yuri Rubinsky
c84d050980 Add node list param to GraphEdit::delete_nodes_request signal 2022-05-17 13:28:21 +03:00
SnailRhymer
d79818acb6 Fix errors and improve UX relating to new animation libraries
- Fix a bug causing an error message when a scene containing an AnimationPlayer with a reset track is saved, by correctly referencing the temporary "default" library.
- Make library dropdown in new animation window assign correct library when creating an animation.
- Similarly allow choice of library when duplicating animation.
- Make library dropdown default to library of currently selected animation.
- Make library dropdown show when exactly one library exists, and it isn't [Global]. Include [Global] on the dropdown in this case (will be newly created if dialog is confirmed).
- When appending (x) to avoid New Anim name collisions, correctly check target library instead of [Global].
- Add parentheses when appending x when duplicating animations in the library editor, for consistency.
- Change titles and prompts to be distinct in name/rename/duplicate dialiogs.
- Fix bug in OprionButton.get_selectable_item(true) when last is not selectable.
- Fix issues where animation wasn't found on deletion/rename by correctly prepending library name.
- Remove an extraneous print_line from animation_track_editor.
- Add messages to errors when an animation isn't found.
2022-05-17 00:02:51 +01:00
Paweł Fertyk
3d5dd91f22 Fix get_breakpointed_lines crashing Godot
Fixes #60668.
2022-05-16 18:46:01 +02:00
monkeyman192
31381f8c9e Allow TreeItem nodes to toggle visibility 2022-05-16 23:55:05 +10:00
Rémi Verschelde
fa2b3269ae
Merge pull request #59231 from Sauermann/fix-top-level-identification 2022-05-16 15:10:27 +02:00
Rémi Verschelde
9efb134469
Merge pull request #59799 from Sauermann/fix-gridcontainer-remaining-pixel 2022-05-16 15:04:48 +02:00
Rémi Verschelde
df2de05c5f
Merge pull request #60463 from Geometror/improve-vs-1 2022-05-16 13:50:42 +02:00
Rémi Verschelde
7b571ab8f7
Merge pull request #60986 from fire-forge/capitalism 2022-05-16 13:49:14 +02:00
reduz
746dddc067 Replace most uses of Map by HashMap
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
  (order matters) but use is discouraged.

There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
2022-05-16 10:37:48 +02:00
derammo
47d0dc8a41 popup deferred hide suppressed if reopened
popup no longer tries to close itself a second time
popup no longer closes after having been reopened
fixed bug in RenameDialog not calling base (by inspection)
fixes #59181
fixes #60921
reverts #59287
2022-05-13 09:30:00 -04:00
bruvzg
081b6b8053
Add ALT NUM+ {hex code} character input support for LineEdit, TextEdit and CodeEdit. 2022-05-13 09:33:24 +03:00
FireForge
88a8038387 Capitalize/fix some property enum hints 2022-05-12 15:03:16 -05:00
reduz
8b7c7f5a75 Add a new HashMap implementation
Adds a new, cleaned up, HashMap implementation.

* Uses Robin Hood Hashing (https://en.wikipedia.org/wiki/Hash_table#Robin_Hood_hashing).
* Keeps elements in a double linked list for simpler, ordered, iteration.
* Allows keeping iterators for later use in removal (Unlike Map<>, it does not do much
  for performance vs keeping the key, but helps replace old code).
* Uses a more modern C++ iterator API, deprecates the old one.
* Supports custom allocator (in case there is a wish to use a paged one).

This class aims to unify all the associative template usage and replace it by this one:
* Map<> (whereas key order does not matter, which is 99% of cases)
* HashMap<>
* OrderedHashMap<>
* OAHashMap<>
2022-05-12 11:21:29 +02:00
Rémi Verschelde
694baff233
Merge pull request #60932 from Geometror/button-fix-expand-icon 2022-05-10 22:58:56 +02:00
Hendrik Brucker
c09a5e2774 Fix button icon expansion calculation with empty text 2022-05-10 22:27:48 +02:00
floppyhammer
f76d417d8a Add fill_mode to ProgressBar 2022-05-10 19:34:48 +08:00
kobewi
20cfe6e229 Simplify anchor metadata 2022-05-09 18:51:13 +02:00
Rémi Verschelde
5013c1d5b6
Merge pull request #60890 from pfertyk/issue-60866-fix-backspace-selection-left 2022-05-09 15:52:56 +02:00
Paweł Fertyk
d1aed90976 Fix backspace when selection reaches left edge
Fixes #60866.
2022-05-09 14:16:28 +02:00
Haoyu Qiu
96cd2d9f52 Fix tree button icon not centered vertically 2022-05-09 10:53:09 +08:00
kobewi
800d5567a1 Remove font height restriction from Button 2022-05-08 13:33:57 +02:00
Vitika9
aef3b5681d Changed signals of ItemList 2022-05-06 13:09:04 +05:30
kobewi
1dc7bcc83c Cleanup metadata usage 2022-05-06 00:27:10 +02:00
Hugo Locurcio
b6e9314564
Merge pull request #59185 from NeilKleistGao/master 2022-05-05 16:41:39 +02:00
Rémi Verschelde
d5d86cb26e
Merge pull request #60571 from Sauermann/fix-control-screen-position
Inlcude CanvasLayer transform into calculation of Control screen position
2022-05-03 15:26:39 +02:00
Hugo Locurcio
180e5d3028
Remove RES and REF typedefs in favor of spelled out Ref<>
These typedefs don't save much typing compared to the full `Ref<Resource>`
and `Ref<RefCounted>`, yet they sometimes introduce confusion among
new contributors.
2022-05-03 01:43:50 +02:00
Rémi Verschelde
c273ddc3ee Style: Partially apply clang-tidy's cppcoreguidelines-pro-type-member-init
Didn't commit all the changes where it wants to initialize a struct
with `{}`. Should be reviewed in a separate PR.

Option `IgnoreArrays` enabled for now to be conservative, can be
disabled to see if it proposes more useful changes.

Also fixed manually a handful of other missing initializations / moved
some from constructors.
2022-05-02 16:28:25 +02:00
Hendrik Brucker
6d876baf60 Improve the VisualShader/VisualScript editor UI 2022-04-30 03:56:57 +02:00
Nathan Franke
925e54ad65
fix lines ending in comments causing auto indent 2022-04-28 20:07:10 -05:00
Rémi Verschelde
9101c5b499
Merge pull request #52624 from e8newallm/52577
Corrected ordering of Left/Top/Right/Bottom properties
2022-04-28 17:57:02 +02:00
Markus Sauermann
f01e1ce1dd Inlcude CanvasLayer transform into calculation of Control screen position 2022-04-28 00:18:32 +02:00
Rémi Verschelde
8c2b9801fd
Merge pull request #60438 from Paulb23/text-edit-tests
Add TextEdit unit tests and multiple fixes.
2022-04-25 23:39:30 +02:00
Rindbee
44e32ba75c Fix font_size not working in TabContainer 2022-04-25 23:22:59 +08:00
Rémi Verschelde
02bb8e948f
Merge pull request #60261 from fire-forge/theme-prop-renames 2022-04-25 16:20:19 +02:00
Rémi Verschelde
49a7f929a6
Merge pull request #60123 from KoBeWi/borrowed
ItemList selection bug && navigation bug fixed
2022-04-25 16:18:58 +02:00
Thakee Nathees
09835f3cc5 ItemList selection bug && navigation bug fixed
Co-authored-by: kobewi <kobewi4e@gmail.com>
2022-04-24 00:31:02 +02:00
FireForge
3073b85de9 Rename theme properties to include underscores
- check_vadjust -> check_v_adjust
- close_h_ofs -> close_h_offset
- close_v_ofs -> close_v_offset
- commentfocus -> comment_focus
- hseparation -> h_separation
- ofs -> offset
- selectedframe -> selected_frame
- state_machine_selectedframe -> state_machine_selected_frame
- table_hseparation -> table_h_separation
- table_vseparation -> table_v_separation
- vseparation -> v_separation
2022-04-23 11:16:18 -05:00
Paulb23
7f62a74927 Multiple small TextEdit Bug Fixes
Fixed line_drawing_cache not containing anything
Fixed is_move_caret_on_right_click_enabled requiring the context menu to be enabled
Fixed when selecting_enabled is false not disabling shift + click
Fixed when selecting_enabled is false not being able to drag the caret
Fixed _delete emitting signals when nothing had changed.
Fixed insert_line_at up causing a visual update
Fixed get_pos_at_line_column returning a valid position when it was invalid
Fixed set_caret_column unnecessary emitting "caret_changed" when the column is greater then the line
Fixed select_word_under_caret not accepting the edges of words
Fixed select_word_under_caret moving the caret to the start of the line when no word was found
Fixed get_selection_line and get_selection_column not checking if the selection was enabled
Fixed set_line_as_center_visible throwing errors if it would show line 0
Fixed set_line_as_center_visible being off by one
Fixed set_line_as_last_visible not being able to show the first line
Fixed pressing UP and the end of a wrapped line sending the caret to col 0 rather then then persevering the position.
2022-04-22 17:53:14 +01:00
bruvzg
be611c1c05
Implement Label3D node.
Add "generate_mipmap" font import option.
Add some missing features to the Sprite3D.
Move BiDi override code from Control to TextServer.
Add functions to access TextServer font cache textures.
Add MSDF related flags and shader to the standard material.
Change standard material cache to use HashMap instead of Vector.
2022-04-22 12:08:46 +03:00
Hugo Locurcio
d1c2a0df4e
Add a property hint for AspectRatioContainer's ratio property
Zero or negative ratios are not valid, so the property hint prevents
choosing such values.

The property hint allows using 4 decimals so that common aspect ratios
like 16/9 can be specified with a good level of precision.
2022-04-17 22:03:47 +02:00
Michael Alexsander
bab2f3c021 Add font_separator and related properties to PopupMenu 2022-04-13 23:46:35 -03:00
Rémi Verschelde
3b57c2ce6b
Merge pull request #60221 from YeldhamDev/grid_toplevel_fix
Fix `GridContainer` not ignoring toplevel children
2022-04-14 00:33:52 +02:00
Michael Alexsander
506d8ba526 Fix GridContainer not ignoring toplevel children 2022-04-13 18:09:51 -03:00
Michael Alexsander
59c3d4e17f Fix and tweak labeled separator in PopupMenu 2022-04-13 17:13:29 -03:00
ConteZero
6530e55f2d Fix select_all() crash in RichTextLabel 2022-04-13 15:41:34 +02:00
bruvzg
8b0761d1fd
Fix sub-menu keyboard navigation. 2022-04-13 09:58:38 +03:00
Rémi Verschelde
d9cb39c2e8
Merge pull request #60170 from ConteZero/context_menu 2022-04-12 18:42:58 +02:00
ConteZero
645aded7e9 Add context menu to RichTextLabel 2022-04-12 16:28:38 +02:00
Rémi Verschelde
5974e1432e
Merge pull request #60085 from YeldhamDev/relationships_are_hard 2022-04-11 23:36:13 +02:00
Rémi Verschelde
9d86e4f446
Merge pull request #59927 from Zylann/fix_graphnode_title_trim
Fix GraphNode not resizing with larger title
2022-04-11 21:07:40 +02:00
Eric McGuirk
b1441bbcfc Fix toggling GraphEdit's minimap with minimap_enabled
Fixes #53831.
2022-04-11 17:52:04 +02:00
Rémi Verschelde
b936359e07
Merge pull request #60026 from ConteZero/shortcut_keys_enabled 2022-04-11 17:50:41 +02:00
Rémi Verschelde
4ab86c6731
Merge pull request #59980 from reduz/animation-libraries 2022-04-11 14:18:35 +02:00
Rémi Verschelde
5613ac37d6
Merge pull request #59440 from bruvzg/fd_ref_counted 2022-04-11 14:12:18 +02:00
Rémi Verschelde
f44e5dba6d
Merge pull request #60124 from KoBeWi/sepyt_noitcennoc_dilav 2022-04-11 12:52:13 +02:00
reduz
6f401439f8 Implement Animation Libraries
* Instead of containing single animations, AnimationPlayer now contains libraries.
* Libraries, in turn, contain the animations.

This paves the way for implementing the possibility of importing scenes as animation libraries, finally allowing to import animations separate from the 3D models.

Missing (will be done on separate PRs):

* Make it possible to import scenes (dae/fbx/gltf) as animation libraries.
* Make it possible for AnimationTree to import animation libraries on its own, so it does not rely on AnimationPlayer for everything.
2022-04-11 12:51:54 +02:00
bruvzg
9381acb6a4
Make FileAccess and DirAccess classes reference counted. 2022-04-11 13:28:51 +03:00
kobewi
b29aff8dac Fix GraphEdit's valid connections being reversed 2022-04-11 00:34:59 +02:00
ConteZero
addadaaa24 Add select_all() to RichTextLabel 2022-04-10 18:03:10 +02:00
Michael Alexsander
335068e89b Draw relationship lines for items offscreen 2022-04-09 20:59:17 -03:00
ConteZero
a3d82f5afb Fix shortcut_keys_enabled in TextEdit 2022-04-08 15:13:32 +02:00
bruvzg
f851c4aa33
Fix some issues found by cppcheck. 2022-04-06 14:34:37 +03:00
bruvzg
9c61fa7ad8
[RTL] Improve table cell selection. 2022-04-06 09:03:08 +03:00
Marc Gilleron
79c6d7ad7f Fix GraphNode not resizing with larger title 2022-04-05 21:57:54 +01:00
bruvzg
d1207a0504
[Input] Add extra shortcut_input input processing step to process Unicode character input with Alt / Ctrl modifiers, after processing of shortcuts. 2022-04-05 13:46:45 +03:00
Haoyu Qiu
8cefbfcf43 Consider chained operation when selecting text in TextEdit::undo() 2022-04-05 09:12:10 +08:00
Rémi Verschelde
f454cea785
Merge pull request #58452 from marcgpuig/text-edit-backspace-fix 2022-04-04 23:58:33 +02:00
Rémi Verschelde
f8ab79e68a Zero initialize all pointer class and struct members
This prevents the pitfall of UB when checking if they have been
assigned something valid by comparing to nullptr.
2022-04-04 19:49:50 +02:00
Rémi Verschelde
e659eb66a0
Merge pull request #59874 from ConteZero/richtextlabel_deselect 2022-04-04 16:57:11 +02:00
ConteZero
45159e88e1 Add deselect() to RichTextLabel 2022-04-04 16:06:57 +02:00
Rémi Verschelde
338b23d572
Merge pull request #59513 from BastiaanOlij/openxr_actionmap_editor 2022-04-04 14:26:28 +02:00
Bastiaan Olij
9b7b9de0e5 Add action map editor for OpenXR 2022-04-04 18:43:29 +10:00
Marc Garcia Puig
f22d257025 Fixed ctrl + backspace on empty lines
Fix <word><space><caret> scenario

Fix move left & right for lines without words
2022-04-04 01:21:16 +02:00
jmb462
0d17903bd5 Fix TextEdit v_scroll_speed invalid values breaks wheel scrolling 2022-04-03 21:07:39 +02:00
Markus Sauermann
6b3207644b Distribute remaining pixel to expanding childs of GridContainer 2022-04-01 19:04:07 +02:00
Markus Sauermann
249d6a4225 Fix how Root Control Node is determined 2022-04-01 13:34:57 +02:00
C.Even
2080077c9c Fix that slow mouse wheel scroll has no zoom effect on 2D editor
* scroll_vec in ViewPanner::gui_input is multiplied by float factors, 
  so it should be a Vector2 rather than Vector2i
* Fixes #57423
2022-04-01 18:34:00 +08:00
Rémi Verschelde
4263f02f28
Merge pull request #59764 from reduz/blender-import-autodetect 2022-04-01 11:42:05 +02:00
reduz
e32215fbad Add Blender install autodetection and configuration.
This PR is a continuation to #54886

* Changed Blender path editor setting from binary to installation.
* Add a class to query whether the format is supported.
* This class allows to create proper editors to configure support.

**NOTE**: This PR only provides autodetection on Linux. Code needs to be added for Windows and MacOS to autodetect the Blender installation.

Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
Co-authored-by: Pedro J. Estébanez <pedrojrulez@gmail.com>
2022-04-01 11:01:12 +02:00
NeilKleistGao
d8946a7111 Remove metadata _edit_layout_mode and _edit_use_custom_anchors if they have default values 2022-04-01 13:38:32 +08:00
Haoyu Qiu
2f20ff0ed6 Extract theme property names for localization 2022-04-01 11:35:22 +08:00
Michael Alexsander
b8ce726dd0 Small fixes for TabContainer 2022-03-31 16:43:09 -03:00
Rémi Verschelde
a647fb3e62 Fix typos with codespell
Using codespell 2.2-dev from current git.

Fix a couple incorrect uses of gendered pronouns.
2022-03-31 14:07:29 +02:00
Rémi Verschelde
fc4e9d6299
Merge pull request #59702 from Sauermann/fix-subviewport-container-event-transform
Fix event transform in SubViewportContainer
2022-03-31 11:07:21 +02:00
Markus Sauermann
0472839509 Fix Control::warp_mouse to respect canvas transform 2022-03-30 23:18:23 +02:00
Markus Sauermann
c8573ea3df Fix event transform in SubViewportContainer
The transform does not take the canvas transform into account.
2022-03-30 20:56:36 +02:00
Pierre-Thomas Meisels
63f7f44ccb Make vararg method bind no return and return
Type emit_signal exposed method return type

set UndoRedo add_do_method and add_undo_method exposed return void

Set TreeItem::_call_recursive_bind returns void

Set _rpc_bind and _rpc_id_bind returns void in Node

Set _call_group and _call_group_flags method returns void in SceneTree

Set godot-cpp-test CI flag to false
2022-03-30 11:43:12 +02:00
Rémi Verschelde
324215c485
Merge pull request #59525 from fire-forge/fix-group-names 2022-03-28 21:44:35 +02:00
FireForge
88b09694e7 Fix inspector group name capitalization 2022-03-28 14:02:06 -05:00
Rémi Verschelde
7119d355eb String: Remove TTR and DTR defines in non-tools build
This ensures we don't use TTR in runtime code, as it's specifically meant
to source translations for the editor.
2022-03-28 20:26:35 +02:00
Rémi Verschelde
abbb0dc082
Merge pull request #59548 from akien-mga/obj-remove-unused-categories 2022-03-28 14:17:24 +02:00
Rémi Verschelde
143d13717b
Merge pull request #59553 from reduz/script-extension-support 2022-03-28 13:35:21 +02:00
reduz
360dea5348 Add GDExtension support to Script
* Ability to create script languages from GDExtension
* Some additions to gdnative_extension.h to make this happen
* Moved the GDExtension binder to core

This now allows creating scripting languages from GDExtension, with the same ease as if it was a module. It replaces the old PluginScript from Godot 3.x.
Warning: GodotCPP will need to be updated to support this (it may be a bit of work as ScriptInstance needs to be created over there again).
2022-03-27 16:13:00 +02:00
Markus Sauermann
0494e024d8 Rename warp mouse functions to warp_mouse 2022-03-27 14:12:01 +02:00
Rémi Verschelde
f0407ad14d
Merge pull request #59336 from YeldhamDev/where_we_dropping_boys 2022-03-26 23:30:07 +01:00
Markus Sauermann
356fac206d Add configuration warning for SubViewportContainer 2022-03-26 20:33:45 +01:00
Rémi Verschelde
5371009d8e Object: Remove unused category boilerplate
We might want to re-add something like this if/when we find a good use case
for it and do the effort to categorize all objects in the API properly.

Until then, it's better to remove that boilerplate since it's not needed.

Closes #18711.
2022-03-26 15:46:01 +01:00
reduz
09b951b99b Refactor Object metadata
* API kept the same (Although functions could be renamed to set_metadata/get_metadata in a later PR), so not much should change.
* Metadata now exposed as individual properties.
* Properties are editable in inspector (unless metadata name begins with _) under the metadata/ namespace.
* Added the ability to Add/Remove metadata properties to the inspector.

This is a functionality that was requested very often, that makes metadata work a bit more similar to custom properties in Blender.
2022-03-24 14:21:52 +01:00
Rémi Verschelde
3586f559d1
Merge pull request #59403 from fire-forge/textureprogressbar-group
Fix "Stretch Margin" group in TextureProgressBar
2022-03-22 23:03:39 +01:00
Michael Alexsander
94b8f38de2 Add visual marker when dragging and dropping tabs 2022-03-21 22:16:29 -03:00
FireForge
e41a890498 Remove unnecessary "Percent" group in ProgressBar 2022-03-21 17:21:56 -05:00
FireForge
ed79931be9 Fix "Stretch Margin" group in TextureProgressBar 2022-03-21 17:18:45 -05:00
Rémi Verschelde
81c2d7a82a
Merge pull request #59322 from YeldhamDev/groups_arent_bools 2022-03-19 18:09:46 +01:00
Michael Alexsander
e289e864d8 Fix tabs_rearrange_group property being exposed as a bool instead of a int 2022-03-19 13:15:51 -03:00
kobewi
342dac77d4 Hide text and icon properties in OptionButton 2022-03-19 13:36:10 +01:00
Rémi Verschelde
19950076b1
Merge pull request #58394 from bruvzg/rtl_hint 2022-03-18 14:49:13 +01:00
Rémi Verschelde
5c8bd6fd71
Merge pull request #58233 from bruvzg/gde_ts 2022-03-18 14:29:58 +01:00
Michael Alexsander
deb1342036 Make TabBar/Container default their alignments to the left instead of center 2022-03-17 18:12:23 -03:00
bruvzg
f19cd44346
Unify TextServer built-in module and GDExtension code. 2022-03-17 08:15:29 +02:00
Haoyu Qiu
a635ecf6d4 Add item tooltip access to OptionButton 2022-03-17 13:50:16 +08:00
taigi100
280956ddc3 Fix children visibility check 2022-03-16 15:51:27 +02:00
风青山
f789c17690 Fix text buf does not clear when calling the method set_item_text in PopupMenu 2022-03-15 21:49:00 +08:00
Rémi Verschelde
47c35f5b96
Merge pull request #59108 from KoBeWi/somewhere_on_the_screen 2022-03-13 18:10:33 +01:00
bruvzg
aada395354
Fix text clipping on the right side. 2022-03-13 17:26:00 +02:00
kobewi
bcf13dc175 Expose methods for screen-space transforms 2022-03-13 16:05:08 +01:00
Haoyu Qiu
d62e8bbc74 Fix RichTextLabel shadow color when text has transparency 2022-03-13 19:57:56 +08:00
Rémi Verschelde
71da4c4132
Merge pull request #54399 from Calinou/filedialog-current-properties-hint-no-editor
Don't store and show current file/directory/path FileDialog properties
2022-03-12 20:48:32 +01:00
Rémi Verschelde
d7019de7e3
Merge pull request #59061 from fazil47/graph_edit_offset_fix 2022-03-12 15:03:38 +01:00
Fazil Babu
a3598b487a popup_request signal emits mouse click position 2022-03-12 14:00:04 +05:30
kobewi
42078dec9f Allow negative indexes in ItemList and PopupMenu 2022-03-12 01:14:03 +01:00
Rémi Verschelde
3f3826edb8
Merge pull request #59007 from novaplusplus/code_edit_from_to_error_fix 2022-03-11 16:06:00 +01:00
Rémi Verschelde
768f9422bc Convert uses of DirAccess * to DirAccessRef to prevent memleaks
`DirAccess *` needs to be deleted manually, and this is often forgotten
especially when doing early returns with `ERR_FAIL_COND`.
`DirAccessRef` is deleted automatically when it goes out of scope.

Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2022-03-11 09:13:11 +01:00
nova++
4b8fa3716f Fix "p_from_line > p_to_line" errors in text edit
Done via making the function more robust to different inputs
2022-03-11 01:13:45 -05:00
reduz
6f51eca1e3 Discern between virtual and abstract class bindings
* Previous "virtual" classes (which can't be instantiated) are not corretly named "abstract".
* Added a new "virtual" category for classes, they can't be instantiated from the editor, but can be inherited from script and extensions.
* Converted a large amount of classes from "abstract" to "virtual" where it makes sense.

Most classes that make sense have been converted. Missing:

* Physics servers
* VideoStream
* Script* classes.

which will go in a separate PR due to the complexity involved.
2022-03-10 12:28:11 +01:00
Markus Sauermann
40c08e522f Revert "Update mouse cursor shape after changes"
This reverts commit 0fce98b4b5.
2022-03-10 09:43:06 +01:00
reduz
21637dfc25 Remove VARIANT_ARG* macros
* Very old macros from the time Godot was created.
* Limited arguments to 5 (then later changed to 8) in many places.
* They were replaced by C++11 Variadic Templates.
* Renamed methods that take argument pointers to have a "p" suffix. This was used in some places and not in others, so made it standard.
* Also added a dereference check for Variant*. Helped catch a couple of bugs.
2022-03-09 18:39:13 +01:00
Rémi Verschelde
a2d67c2fff
Merge pull request #58913 from Sauermann/fix-mouse-cursor-change 2022-03-09 09:05:20 +01:00
Markus Sauermann
0fce98b4b5 Update mouse cursor shape after changes
This fixes some cases where the mouse cursor shape did not change automatically, but instead required a MouseMove to update.
2022-03-09 07:54:03 +01:00
Michael Alexsander
182e038af5 Replace TabBar's min_width with max_tab_width and expose it 2022-03-09 01:48:18 -03:00
Marcel Admiraal
507f72db8e Rename Control's Rect properties to exclude rect_ part 2022-03-08 16:30:35 +00:00
Rémi Verschelde
45fa14e1ae
Merge pull request #58850 from YeldhamDev/more_tab_regressions 2022-03-08 14:28:39 +01:00
Rémi Verschelde
761398556e
Merge pull request #58887 from cesarizu/bbcode_align_left 2022-03-08 12:52:54 +01:00
Rémi Verschelde
8ca4bd2755
Merge pull request #58879 from Calinou/basebutton-shortcut-context-fix-typo 2022-03-08 12:52:28 +01:00
César Izurieta
42f1697857 Add support to align to left to bbcode 2022-03-08 01:36:19 -05:00
Paweł Fertyk
5381a27f79 Fix crash with all_tabs_in_front
Fixes #58790.
2022-03-08 00:19:21 +01:00
Hugo Locurcio
be5116c4a4
Fix typo in BaseButton shortcut context methods 2022-03-07 22:36:12 +01:00
Michael Alexsander
c0381594c3 Fix regressions with nameless and icon-only tabs 2022-03-06 22:17:35 -03:00
kobewi
2057ea2883 Remove duplicate editor settings definitions 2022-03-06 22:05:49 +01:00
Rémi Verschelde
def893b3d4
Merge pull request #58805 from KoBeWi/meh_custom
Remove custom_* prefixes compatibility
2022-03-06 10:16:53 +01:00
kobewi
7d44bb8f06 Remove set_as_minsize() 2022-03-06 00:57:42 +01:00
kobewi
c003ab43c3 Remove custom_* prefixes compatibility 2022-03-05 21:35:10 +01:00
kobewi
b3864db7e0 Change tabs_rearrange_group to property 2022-03-05 21:03:01 +01:00
Michael Alexsander
ebf630441f Fix renaming TabContainer children not updating tab names when outside the tree 2022-03-04 18:26:08 -03:00
Rémi Verschelde
7de48982fe
Merge pull request #58691 from miremrie/absolute-file-path-in-file-browser 2022-03-04 12:25:15 +01:00
Rémi Verschelde
9d5d20ae6d
Merge pull request #58687 from YeldhamDev/the_beast_has_been_slain 2022-03-04 12:18:55 +01:00
Rémi Verschelde
8845798b44
Merge pull request #58739 from Calinou/control-add-constructors
Add optional constructor arguments to more Control nodes
2022-03-04 11:42:53 +01:00
Hugo Locurcio
a06f82ca4d
Add optional constructor arguments to more Control nodes
This can be used to make editor code more compact.
However, as of writing, these constructor arguments cannot be used
from the scripting API.

This was already provided for Label and CheckBox, but it was missing
for other Control nodes where it made sense to provide a default value.
2022-03-04 09:48:41 +01:00
Haoyu Qiu
933211cb0c Remove extra separator when TextEdit is read only and unselectable 2022-03-04 16:25:25 +08:00
Michael Alexsander
a811ebf699 Make TabContainer use TabBar internally 2022-03-03 21:49:58 -03:00
Hugo Locurcio
816d332e51
Fix LineEdit and TextEdit carets disappearing at theme scales below 1.0
This fixes carets disappearing in the editor when the Editor Scale
setting is set below 100%.
2022-03-03 00:15:48 +01:00
miremrie
a5e30c0228 Allow absolute file paths in file dialogs 2022-03-02 19:42:39 +01:00
Rémi Verschelde
1b446ebcd4
Merge pull request #58559 from fazil47/scene-tree-icon-focus
Double clicking scene tree icon focuses that node
2022-03-01 08:46:14 +01:00
Rémi Verschelde
c8e62555f6
Merge pull request #58477 from AlbertFay/text-under-scrollbar 2022-03-01 01:32:36 +01:00
Paulb23
7f5782047e Fixed caret change signal emission 2022-02-28 19:01:44 +00:00
Fazil Babu
f2b0bd54b2 Double clicking scene tree icon focuses that node 2022-02-27 17:16:45 +05:30
albertfay1121
dba0d52349 Fixed bug with text going under scrollbar
added classes reference update
2022-02-25 13:45:38 -08:00
bruvzg
74ff5921d6 Improve popup window handling.
Add window FLAG_POPUP and a platform specific routines to control popup auto-hiding and event forwarding.
2022-02-25 09:33:27 +02:00
bruvzg
7385c3602d
Add RichTextLabel "hint" tag. 2022-02-21 19:34:16 +02:00
Rémi Verschelde
417698c202
Merge pull request #58042 from Sauermann/fix-viewport-border-notifications
Fix Viewport mouse enter+exit notifications
2022-02-19 09:07:07 +01:00
Rémi Verschelde
51a00c2855
Merge pull request #58182 from akien-mga/style-cleanup-if-semicolons-deadcode 2022-02-16 16:55:07 +01:00
Rémi Verschelde
eeda603355
Merge pull request #58055 from markdibarry/add_get_line_offset 2022-02-16 14:07:23 +01:00
Rémi Verschelde
fe8f4cebce
Merge pull request #58154 from markdibarry/fix_scroll_to_line 2022-02-16 14:07:06 +01:00
Rémi Verschelde
b8b4580448
Style: Cleanup single-line blocks, semicolons, dead code
Remove currently unused implementation of TextureBasisU, could be re-added
later on if needed and ported.
2022-02-16 14:06:29 +01:00
Markus Sauermann
415042ac89 Connect notifications from Container to Viewport
mouse enter+exit
2022-02-15 22:41:30 +01:00
markdibarry
4d53c086ff Fix scroll_to_line ignoring line separation 2022-02-15 12:52:11 -05:00
Rémi Verschelde
0f5455230c
Use switch consistently in _notification (scene folder) 2022-02-15 18:44:55 +01:00
Rémi Verschelde
11572c6e30
Editor: Cleanup some includes dependencies
Removes some unnecessary includes from `editor_node.h`, and instead add
those where they're used.

Removes unnecessary `editor_node.h` includes in various editor classes.

Renames `dynamicfont` to `dynamic_font` in a couple files.

Misc cleanup while jumping through that rabbit hole.
2022-02-15 14:54:15 +01:00
Rémi Verschelde
760a95e86a
Merge pull request #57877 from bruvzg/subpixel_gl_pos 2022-02-15 13:58:38 +01:00
Rémi Verschelde
89996be091
Merge pull request #57988 from markdibarry/add_get_last_visible_character_line 2022-02-14 15:22:03 +01:00
Rémi Verschelde
af98de8823
Merge pull request #58089 from YeldhamDev/crashy_tabs 2022-02-14 15:21:18 +01:00
Michael Alexsander
2b4d417e99 Fix crash when removing tabs from TabBar 2022-02-14 01:58:17 -03:00
markdibarry
c0caafe960 Add offset methods for lines and paragraphs in RichTextLabel
Adds `get_line_offset` and `get_paragraph_offset` methods to `RichTextLabel`

Fix arg mismatch
2022-02-13 13:15:21 -05:00
markdibarry
ae7eec53c0 Add get_character_line method for RichTextLabel
Adds the ability to get the line number of provided character position

Fix arg name

Add get_character_paragraph

Replaced glyph logic with code suggestions, added get_character_paragraph method

Run doctool

Use built-in method

Replace TS access with built in method
2022-02-13 11:12:12 -05:00
Yuri Sizov
ddc8ec6b44 Limit inspector updates when dragging anchored controls 2022-02-13 00:19:06 +03:00
bruvzg
29199579f7
Add sub-pixel glyph positioning support. 2022-02-12 19:55:52 +02:00
Rémi Verschelde
732725d663
Merge pull request #58006 from bruvzg/fix_rtl_img_resize 2022-02-12 15:28:26 +01:00
bruvzg
d7f6a4853a
[RTL] Fix "img" tag not setting image size. 2022-02-12 11:48:56 +02:00
Hendrik Brucker
b396fd4eef Improve compilation speed (forward declarations/includes cleanup) 2022-02-12 02:46:22 +01:00
bruvzg
2e01a0d7a3
[RTL / Label] Reorganize property order to ensure "visible_characters" / "percent_visible" are set after the "text". 2022-02-11 12:31:13 +02:00
Rémi Verschelde
9abf5f01fd
Merge pull request #55207 from ConteZero/rich_text_label_drag 2022-02-10 22:14:08 +01:00
Rémi Verschelde
69ddf2fd05
Merge pull request #55157 from pycbouh/control-inspector-reorg 2022-02-10 22:13:28 +01:00
ConteZero
cb222f6c9d Add drag to RichTextLabel 2022-02-10 20:24:28 +01:00
Yuri Sizov
107b6f299c Reorganize inspector layout workflow for Control nodes 2022-02-10 20:29:34 +03:00
Rémi Verschelde
d6abf8f158
Merge pull request #57873 from markdibarry/add_get_content_width_RichTextLabel 2022-02-10 18:24:13 +01:00
markdibarry
29c21ac590 Add get_content_width method
Adds a get_content_width method to RichTextLabel
2022-02-10 10:56:11 -05:00
Rémi Verschelde
1bdb82c64e
Fix typos with codespell
Using codespell 2.2-dev from current git.

Added `misc/scripts/codespell.sh` to make it easier to run it once in a
while and update the skip and ignore lists.
2022-02-10 12:30:19 +01:00
Rémi Verschelde
f88a83f611
Merge pull request #57810 from timothyqiu/tree-button-id 2022-02-09 11:11:01 +01:00
Rémi Verschelde
196801fc64
Merge pull request #57837 from YeldhamDev/that_was_pointless 2022-02-09 09:38:39 +01:00
Michael Alexsander
ef81dc1831 Remove code to update the layout direction of submenus from PopupMenu 2022-02-09 01:36:20 -03:00
Markus Sauermann
35806c1511 Adjust id creation in PopupMenu to avoid duplicate ids 2022-02-09 01:17:55 +01:00
Rémi Verschelde
8907c566ed
Merge pull request #57773 from pfertyk/issue_57710_tabbar_update_hover 2022-02-08 23:12:05 +01:00
Paweł Fertyk
2d82e076f4 Fix TabBar._update_hover crash
Fixes #57710.
2022-02-08 22:06:58 +01:00
Haoyu Qiu
374299c6fb Improve TreeItem button API 2022-02-08 23:56:13 +08:00
Rémi Verschelde
b6ddf4a629
Merge pull request #57692 from YeldhamDev/popping_options 2022-02-08 14:04:28 +01:00
Rémi Verschelde
e26598b4a1
Merge pull request #40140 from hinlopen/tree-scroll-center 2022-02-08 13:43:19 +01:00
Rémi Verschelde
fc076ece3d
Revert "Add missing SNAME macro optimization to all theme methods call"
This reverts commit a988fad9a0.

As discussed in #57725 and clarified in #57788, `SNAME` is not meant to be used
everywhere but only in critical code paths. For theme methods specifically, it
was by design that only getters use `SNAME` and not setters.
2022-02-08 10:17:25 +01:00
Michael Alexsander
59e9a8c275 Fix theming for floating window docks 2022-02-07 09:55:25 -03:00
Rémi Verschelde
b024602660
Merge pull request #57725 from jmb462/missing-sname-theme-setters 2022-02-07 11:46:25 +01:00
Michael Alexsander
8bde86da10 Make popups from MenuButton, OptionButton, and submenus obey the layout direction 2022-02-06 23:07:08 -03:00
jmb462
a988fad9a0 Add missing SNAME macro optimization to all theme methods call 2022-02-06 23:06:11 +01:00
Rémi Verschelde
784b74ef56
Merge pull request #57721 from YeldhamDev/separate_from_separators
Better handle icons and checkboxes with separators in `PopupMenu`
2022-02-06 21:24:06 +01:00
Michael Alexsander
989caab0ad Better handle icons and checkboxes with separators in PopupMenu 2022-02-06 16:05:45 -03:00
Michael Alexsander
21bf23d966 Enhancements and fixes for OptionButton and PopupMenu 2022-02-06 16:03:18 -03:00
jmb462
1ce81dc5f2 Add missing SNAME macro optimization in some function calls 2022-02-06 15:54:04 +01:00
Ger Hean
8acc8838c4 Add shortcut_cell double click functionality 2022-02-05 19:06:54 +08:00
Stijn Hinlopen
31824420e4 Center when scrolling to tree item. 2022-02-05 10:59:33 +01:00
kobewi
e714f5e56e Rework TextureButton stretch 2022-02-05 02:11:32 +01:00
bruvzg
244db37508
Cleanup and move char functions to the char_utils.h header. 2022-02-04 11:35:01 +02:00
Rémi Verschelde
f8f19b313d
Merge pull request #57562 from AnilBK/string-add-contains
String: Add contains().
2022-02-03 22:21:24 +01:00
Anilforextra
adbe948bda String: Add contains(). 2022-02-04 01:28:02 +05:45
Rémi Verschelde
5e39a8eded
Merge pull request #56992 from YeldhamDev/smarter_popmenu_focus 2022-02-03 17:15:06 +01:00
bruvzg
ead6f67670
Add auto-wrap mode property to the RichTextLabel, set default auto-wrap mode to AUTOWRAP_WORD_SMART to match 3.x behavior. 2022-02-03 16:04:07 +02:00
Gilles Roudière
73e784de1e Remove get_focus_owner() from Control, replaced by get_viewport()->gui_get_focus_owner() 2022-02-03 11:59:32 +01:00
Rémi Verschelde
36880714e4
Merge pull request #57517 from groud/viewport_expose_gui_focus 2022-02-03 11:20:20 +01:00
bruvzg
215bede6ff
[TextServer] Add function to change font, font size, and OpenType features without invalidating line break points, justification points, or recreating shaped text buffer. 2022-02-02 11:20:44 +02:00
Gilles Roudière
3521eecb4c Exposes gui_release_focus and gui_get_focus_owner to Viewport 2022-02-01 15:07:22 +01:00
Rémi Verschelde
d4e21b7d62
Merge pull request #57358 from akien-mga/signal-bindings-object 2022-02-01 14:24:47 +01:00
Rémi Verschelde
f1bff648f2
Merge pull request #57355 from akien-mga/method-bindings-clearer-types 2022-02-01 14:24:35 +01:00
Rémi Verschelde
45553fd586
Merge pull request #56970 from YeldhamDev/rise_tabbar_rise 2022-01-31 21:46:07 +01:00
Michael Alexsander
64c4a5b283 Bring TabBar to full parity with the TabContainer implementation. 2022-01-31 15:35:54 -03:00
Rémi Verschelde
7da9e31f66
Merge pull request #57405 from kleonc/texture_button_focus_only_logic_fix 2022-01-31 18:22:58 +01:00
Rémi Verschelde
74b1e77938
Merge pull request #57276 from IgorKordiukiewicz/fix-auto-brace-complete-wrap-on-selection 2022-01-31 18:14:01 +01:00
Rémi Verschelde
777c821748
Merge pull request #57462 from mashumafi/master-fix-button-icon-alpha3
Fix button icon_disabled_color alpha channel
2022-01-31 14:53:22 +01:00
Rémi Verschelde
7cb25c2870
Merge pull request #57456 from Paulb23/placeholder-color
Move placeholder colour to theme item
2022-01-31 14:52:34 +01:00
bruvzg
e1148cc452 Revert "Fix control node transform animation jitter with pivot offset"
This reverts commit dfb7d46a2a.
2022-01-31 13:30:35 +02:00
mashumafi
c317a97359 Fix button icon_color_disabled alpha channel 2022-01-30 14:25:42 -05:00
Paulb23
1cd1df5dc3 Move placeholder color to theme item 2022-01-30 17:56:23 +00:00
Igor Kordiukiewicz
f170d6a171 With auto_brace_complete enabled, selected text now gets wrapped by braces 2022-01-30 17:33:13 +01:00
kleonc
078b8c25ce TextureButton Fix logic for drawing only the focus texture 2022-01-29 16:00:30 +01:00
Nathan Franke
8a0a3accee
simplify formatting scripts, add a clang-tidy script, and run clang-tidy 2022-01-29 04:41:03 -06:00
eikobear
3b146c5eaa Make various improvements to OptionButton
- Allow OptionButton selection to be set to -1 to signify no selection, both via API and in the editor.
- Reset OptionButton selection to -1 when the selected item has been removed.
- Fully convert PopupMenu to a zero-based ID system, which improves an inconsistency in generated IDs when making new items in the editor.
2022-01-28 17:03:45 -05:00
Rémi Verschelde
7c3003fcbe
Improve some signal bindings to use specific Object subtypes 2022-01-28 15:35:40 +01:00
Rémi Verschelde
7072b359b4
Improve some method bindings to use specific Object subtypes
This was made possible by changes to `VariantCaster` which now make
it possible to pass any `Object`-derived type as pointer.
2022-01-28 15:07:22 +01:00
Rémi Verschelde
38c6611b91
Merge pull request #57344 from bruvzg/rtl_fix_tab_offset 2022-01-28 14:04:33 +01:00
bruvzg
a2f5f7cccf Fix RTL table offset, if indent is set. 2022-01-28 12:27:47 +02:00
Rémi Verschelde
9686d680b7
Merge pull request #57116 from bruvzg/win_net_share 2022-01-28 11:03:23 +01:00
bruvzg
978f2edeea [RTL] Fix calculation of the last line height. 2022-01-28 10:13:23 +02:00
Rémi Verschelde
e6caaf4c80
Merge pull request #57205 from TechnoPorg/variant-template-cast
Allow method binds to take Object subclasses as arguments
2022-01-27 23:46:37 +01:00
bruvzg
0014f0233a
[RTL] Fix min. height calculation when fit_content_height is enabled. 2022-01-27 12:05:21 +02:00
Rémi Verschelde
899cd34426
Merge pull request #57281 from Rubonnek/rename-subsequence 2022-01-27 11:03:13 +01:00
Wilson E. Alvarez
3eb5e0ac50
Rename String::is_subsequence_ofi to String::is_subsequence_ofn 2022-01-26 18:03:56 -05:00
bruvzg
cf3d3a6ffa
Fix RichTextLabel [ol type=1] tag closing. 2022-01-26 13:52:24 +02:00
Paulb23
e911eee21b Fix TextEdit placeholder not checking line count 2022-01-25 17:41:05 +00:00
Michael Alexsander
73c225838f Make popup menus focus items automatically when not using the mouse 2022-01-25 13:51:56 -03:00
TechnoPorg
051ef479c9 Allow method binds to take Object subclasses as arguments
This commit adds a condition to VariantCaster that casts Variants of type OBJECT to any type T, if T is derived from Object.
This change enables a fair bit of code cleanup. First, the Variant implicit cast operators for Node and Control can be removed, which allows for some invalid includes to be removed. Second, helper methods in Tree whose sole purpose was to cast arguments to TreeItem * are no longer necessary.
A few small changes also had to be made to other files, due to the changes cascading down all the includes.
2022-01-25 09:03:36 -07:00
Rémi Verschelde
7cbe1835f9
Merge pull request #57189 from bruvzg/fix_shortcut_context_unset 2022-01-25 14:44:30 +01:00
bruvzg
306b98638e
Allow unsetting shortcut_context. 2022-01-25 14:17:45 +02:00
kobewi
342a31e326 Fix 2D Pan Tool 2022-01-24 22:21:19 +01:00
Rémi Verschelde
33960b3b87
Merge pull request #55884 from preslavnpetrov/ctrl-enter-deleting-selection-fix-master 2022-01-24 21:33:14 +01:00
bruvzg
cba8280515 [Windows] Add support for handling network share paths. 2022-01-24 16:22:59 +02:00
Rémi Verschelde
06abfd8c13
Merge pull request #57100 from Paulb23/textedit-placeholder 2022-01-24 09:43:33 +01:00
Preslavb
6f1089af86 Fix selection being deleted and indentation not being accounted for 2022-01-23 23:14:35 +00:00
Rémi Verschelde
bd4d57ede2
BaseButton: Rename pressed property to button_pressed
This fixes a conflict with the `pressed` signal.

The new name is temporary and only intended to solve the conflict for upcoming
alpha builds. Discussions are still ongoing regarding the BaseButton API and
how to rename and refactor more of its properties, signals and methods to have
a clearer API in 4.0.
2022-01-23 22:15:09 +01:00
Paulb23
09212ba151 Add Placeholder to TextEdit 2022-01-23 20:19:36 +00:00
bruvzg
268bab077f
[RTL] Fix missing line separation in the paragraph offset and click calculation. 2022-01-23 19:09:14 +02:00
kobewi
98692d68c3 Minor tweaks and fixes to panning 2022-01-23 13:49:53 +01:00
Rémi Verschelde
e363f404a5
Merge pull request #57000 from KoBeWi/UNLIMITED_PANNING 2022-01-23 00:47:52 +01:00
kobewi
1422c756ed Rename request_code_completion signal 2022-01-22 14:04:35 +01:00
kobewi
74bfe88267 Add ViewPanner to 2D editor 2022-01-21 18:35:06 +01:00
Rémi Verschelde
c70ce4d487
Merge pull request #56124 from KoBeWi/font_slayer 2022-01-21 12:52:24 +01:00
Rémi Verschelde
6f764e6291
Merge pull request #56963 from KoBeWi/wszystkie_pliki 2022-01-21 12:51:58 +01:00
Yuri Roubinsky
8fc0dd9997
Merge pull request #57001 from bruvzg/popup_dialog_fix 2022-01-20 20:22:47 +03:00
Rémi Verschelde
eacde082a5
Merge pull request #53276 from Phischermen/propagate_check 2022-01-20 16:37:16 +01:00
bruvzg
5a97184931 [Windows] Fix pop-up dialogs instantly closing. 2022-01-20 16:51:35 +02:00
Rémi Verschelde
d661835a18
Merge pull request #54729 from Paulb23/text-edit-callable 2022-01-19 21:36:56 +01:00
Paulb23
f43f68f605 Convert TextEdit callbacks to Callable 2022-01-19 17:26:22 +00:00
kobewi
74d08a305e Fix FileDialog localization issues 2022-01-19 17:04:06 +01:00
Hugo Locurcio
84a69d7429 Improve the default project theme
The new default project theme uses StyleBoxFlat extensively for
a more modern design and better scalability to multiple resolutions.

SVG icons are now used in place of PNG icons. While this does not
allow for true vector-based icon drawing (icons are still rasterized
at load-time), this makes the design work easier for contributors
and opens the door to vector drawing in the future (e.g. with polygons
or SDFs).

Like for editor icons, the SVG header file is now built automatically
when a SVG file is changed. This removing the need for running
`make_header.py` manually (TODO).

The "Use Hidpi" project setting has been removed in favor of a
"Default Theme Scale" project setting, which allows creating the
default theme at a higher/lower scale than the default.
This can be used when designing GUIs with a high base resolution
to ensure crisp visuals.

Co-authored-by: Yuri Sizov <yuris@humnom.net>
2022-01-19 18:46:01 +03:00
Yuri Sizov
bcbbbeb050 Ignore layout and translation changes in Controls outside of tree 2022-01-19 18:02:22 +03:00
Rémi Verschelde
82efb1d262
Merge pull request #53923 from KoBeWi/RichBugLabel 2022-01-19 15:23:13 +01:00
kobewi
42c79161c2 Fix bottom line in editor log 2022-01-19 14:26:31 +01:00
Kevin Fischer
a4bac268c9 Addded methods to propagate checks & refactored classes to use new methods. 2022-01-18 19:21:59 -08:00
Yuri Sizov
3f5ed098bb Fix RichTextLabel tables shrinking expanded columns when there is not enough space 2022-01-19 00:44:19 +03:00
Yuri Sizov
3b1c02a139 Fix RichTextLabel not respecting line separation in several cases 2022-01-18 23:01:01 +03:00
Rémi Verschelde
030638e5b4
Merge pull request #56104 from Geometror/add-flow-layout-container
Add FlowContainer
2022-01-18 20:26:29 +01:00
Rémi Verschelde
ce2b5bdfa8
Merge pull request #52969 from bruvzg/locale_detection 2022-01-18 15:43:04 +01:00
Rémi Verschelde
7c771ea310
Merge pull request #47522 from madmiraal/rename-test_width-test_height 2022-01-18 13:39:57 +01:00
bruvzg
40c56ed410
Improve locale detection.
Use separate language, script and country lists.
Add locale selection dialog and property hint.
2022-01-18 14:30:00 +02:00
bruvzg
e02a097280
[TextServer] Implement locale and context sensitive case conversion functions. 2022-01-17 14:23:36 +02:00
Rémi Verschelde
8958e1b352
Merge pull request #56720 from volokh0x/to-fix-#56274 2022-01-16 15:54:42 +01:00
volokh0x
034f31aa5c Save clear action of TextEdit in history when used from context menu 2022-01-16 15:00:57 +02:00
Ricardo Buring
4562106cbf OptionButton::pressed(): give focus to selected 2022-01-15 22:52:12 +01:00
Rémi Verschelde
cba3d5f34d
Merge pull request #56457 from gerhean/focus_file_text_after_popup 2022-01-14 21:17:59 +01:00
Rémi Verschelde
66c9002dab
Merge pull request #56787 from bruvzg/fix_guidelines
Fix CodeEdit guidelines position.
2022-01-14 19:53:20 +01:00
Rémi Verschelde
6689a9360c
Merge pull request #56756 from KoBeWi/great_unification_theory 2022-01-14 16:13:53 +01:00
bruvzg
85424afee6
Fix CodeEdit guidelines position. 2022-01-14 15:51:07 +02:00
kobewi
fbb5580b3d Add ViewPanner to more editors 2022-01-14 13:09:39 +01:00
Rémi Verschelde
e529803ef9
Merge pull request #56738 from YeldhamDev/improve_tab_consistency 2022-01-14 10:42:30 +01:00
Rémi Verschelde
a987ebfde2
Merge pull request #56714 from bruvzg/fix_alignment_break_overrun 2022-01-13 10:20:02 +01:00
Rémi Verschelde
f6792eacf5
Merge pull request #54956 from Calinou/lineedit-textedit-add-caret-width-theme-item
Add a theme constant to change LineEdit and TextEdit's caret width
2022-01-13 09:21:01 +01:00
bruvzg
baec983d8a
[TextServer] Improvements for line breaking, "Fill" alignment, overrun, and interaction between these modes.
Fix "Fill" alignment processing wrong side of the text if overrun trim was applied.
Improve "Fill" alignment to avoid adding excessive subsequent spaces or elongations.
Add font detection to the overrun, to correctly add ellipsis (was using last glyph font, which doesn't necessary have dot character).
Improve line breaking to avoid adding excessive subsequent soft break points for languages without word separator.
Port missing overrun/justification code to the Fallback text server.
Fix inferred text direction detection by controls.
Add tests for "Fill" alignment and line breaking glyph flags.
2022-01-13 08:53:28 +02:00
Michael Alexsander
a989dc019b Improve looks and consistency of tabs 2022-01-12 22:11:43 -03:00
Rémi Verschelde
585231a172
Merge pull request #56492 from akien-mga/remove-author-docstrings 2022-01-12 15:24:17 +01:00
Rémi Verschelde
f135c950a5
Merge pull request #56709 from YeldhamDev/die_monster_you_dont_belong_in_this_world 2022-01-12 11:37:04 +01:00
Rémi Verschelde
b5495783b2
Merge pull request #53185 from KoBeWi/viewing_pan 2022-01-12 11:36:41 +01:00
Michael Alexsander
cb1a648f42 Fix several issues in ´TabBar´ 2022-01-12 00:17:36 -03:00
Ger Hean
9dbe314da6 Create function focus_file_text
This function focuses the text field when saving a file
It is called when the save file dialogue is opened
2022-01-12 01:34:04 +08:00
Rémi Verschelde
019474f2b8
Merge pull request #56586 from dalexeev/rtl-bracket-escapes 2022-01-11 16:17:16 +01:00
kobewi
ba7ed05792 Unify panning in sub-editors and make it configurable 2022-01-11 13:57:19 +01:00
Rémi Verschelde
46624388d4
Merge pull request #56322 from madmiraal/fix-42450 2022-01-11 11:33:59 +01:00
Haoyu Qiu
df1c64feba Fix BBCode underline prevents strikethrough from rendering 2022-01-11 12:54:04 +08:00