Commit graph

3867 commits

Author SHA1 Message Date
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
Paweł Fertyk
3d5dd91f22 Fix get_breakpointed_lines crashing Godot
Fixes #60668.
2022-05-16 18:46:01 +02: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