Commit Graph

656 Commits

Author SHA1 Message Date
d2c82a8ffc Merge pull request #97378 from rune-scape/less-const-cast
Get rid of easily removable uses of `const_cast`
2024-12-02 15:50:06 +01:00
af56d6e8e8 Use SceneStringName in more places 2024-12-02 14:39:16 +01:00
d58b2e879f Get rid of easily removable uses of const_cast 2024-12-01 17:50:13 -08:00
77549dd1f3 [Tree] Allow disabling auto generated tooltip for TreeItem 2024-12-01 14:39:51 +01:00
1cad5525d6 Merge pull request #96841 from maidopi-usagi/tree_item_height_cache
[Tree] Improve Tree Performance by replacing computed height with TreeItem's cached minimum size
2024-11-10 12:12:45 -06:00
07b7af0c81 replace computed height with cached item minimum size 2024-11-07 03:28:08 +08:00
49f918e596 Fix issue where scrolling to item center would overflow on top 2024-11-05 12:50:34 -05:00
bb813ba7bc Fix Tree drag-and-drop scrolling having low FPS at low Physics Ticks per Second
Scrolling is now performed in process instead of physics process.
This makes scrolling much smoother if Physics Ticks per Second is lower
than the rendered FPS.
2024-11-02 18:45:28 +01:00
b7a0971ad2 Merge pull request #97934 from adamscott/give-AThousandShips-a-break
[Codestyle] Set clang-format `RemoveSemicolon` rule to `true`
2024-10-29 19:25:36 -05:00
4aad050067 Merge pull request #97157 from pafuent/fixing_tree_item_get_prev_wrap
Fix `TreeItem` `get_prev*` methods when `p_wrap` is `true`
2024-10-25 13:03:42 -05:00
0d350e7108 Set clang-format RemoveSemicolon rule to true
- Set clang-format `Standard` rule to `c++20`
2024-10-25 13:49:43 -04:00
b3bcb2dc14 Merge pull request #98299 from timothyqiu/tree-coordinate
Fix button click detection when `Tree` is rotated
2024-10-21 16:39:31 -05:00
17642692c5 Fix button click detection when Tree is rotated 2024-10-18 22:43:48 +08:00
ebe1a2d7ec Add hover state to Tree items display 2024-10-17 00:21:52 +02:00
19081a850d Merge pull request #95889 from KoBeWi/tree_growing_sideways
Allow horizontal scrolling in Tree using Shift
2024-10-04 22:43:17 +02:00
3c365a7fa5 Add auto translate mode for cells in Tree 2024-10-01 21:24:10 +08:00
9c0afbb15c Fixing TreeItem get_prev_xxx methods when p_wrap is true
Fixes #85032

The code that fix the issue is courtesy of @Jesusemora, I just added
unit tests for it and did a rebase with the latest changes on master.

Co-authored-by: Jesusemora <32273722+Jesusemora@users.noreply.github.com>
2024-09-23 17:11:02 -03:00
cc52112144 Merge pull request #96643 from bruvzg/fs_links
[FileSystem Dock] Add symlink indicator and tooltip.
2024-09-12 10:28:44 +02:00
325c1cffc4 Merge pull request #96232 from AThousandShips/tree_navigate_row
[Tree] Improve navigation with row select mode
2024-09-08 23:21:44 +02:00
da4f5fb953 [FileSystem Dock] Add symlink indicator and tooltip. 2024-09-06 14:55:07 +03:00
13a90e938f Merge pull request #70096 from rune-scape/stringname-dict
StringName Dictionary keys
2024-09-03 17:38:06 +02:00
168676a7c5 Merge pull request #96000 from kerstop/deadzone_slider_fix
Fix deadzone slider not working correctly
2024-09-03 11:43:20 +02:00
68a04bbf9a Merge pull request #96142 from timothyqiu/one-signal-to-invalidate-them-all
Fix collapsing `TreeItem` not updating horizontal scrollbar
2024-09-02 18:08:07 +02:00
154049ce17 StringName Dictionary keys
also added 'is_string()' method to Variant
and refactored many String type comparisons to use it instead
2024-08-29 13:39:27 -07:00
5c21c0d8d3 [Tree] Improve navigation with row select mode
Allows navigating with the `ui_left/right` actions when selecting rows,
fixing a navigation inconsistency
2024-08-28 18:32:45 +02:00
d16dcbb3ac Fix collapsing TreeItem not updating horizontal scrollbar 2024-08-27 11:49:27 +08:00
2fd39eca30 fix deadzone slider not working correctly 2024-08-23 12:29:24 -05:00
42e5c5b41c Allow horizontal scrolling in Tree using Shift 2024-08-21 10:44:45 +02:00
040f241f39 Improve Tree performance
Added TreeItem::last_child to avoid needing to iterate through all children to get to the end.  This mainly helps in cases where one TreeItem has many children (1000s), and new children are added to the end, as each add had to iterate through all previously added children.
2024-07-26 11:32:45 -04:00
70d450d086 Fix issue causing input lock when drag scrolling a Tree element on touchscreen devices
Prior to this fix, scrolling via mouse drag on touchscreen devices, and
drag&drop operation on a `TreeItem` element would conflict with each other
preventing the drag scroll from being released when the mouse button is
released.

The issue is addressed by disabling drag&drop when drag scrolling is ongoing.
2024-07-18 04:09:54 -07:00
bf20231140 Merge pull request #93179 from TheSofox/tree-nav-crash
Fix engine crashing when using Down Arrow selection on Tree with no selection
2024-06-24 11:14:06 +02:00
d86e02580c Fix engine crashing when using Down Arrow selection on Tree with no selection 2024-06-22 18:40:21 +01:00
fbb879debd [Scene] Add SceneStringNames::text/value_changed 2024-06-19 09:44:38 +02:00
d9e2fc74c7 [Scene] Add SceneStringNames::item_selected 2024-06-19 09:39:05 +02:00
755a0efbb6 [Scene] Add SceneStringNames::id_pressed 2024-05-30 22:54:04 +02:00
7d4d63b807 Fix Tree and FileSystemList edit popup double events and ESC behavior. 2024-05-17 10:03:52 +03:00
413c11357d Use Core/Scene stringnames consistently 2024-05-13 23:41:07 +02:00
9bc5a85b2b Fold TreeItems when clicking to the left of fold icon 2024-05-08 11:30:26 +02:00
eb2bd41fb8 Make handling of rename line-edit popups more robust 2024-05-07 14:29:35 +02:00
308dbb8c63 [Core] Add scalar versions of Vector* min/max/clamp/snap(ped)
Convenience for a number of cases operating on single values
2024-05-02 10:31:13 +02:00
4f4e8589df Fix Tree minimum size calculation
- Take scroll bar space and column title buttons into account
- Fix first column min size sometimes missing one level of indent
- Fix cell min size ignoring text overrun behavior and item inner margin
- Update min size when `hide_root` or `column_title_visible` changes

Wrong description of `item_inner_margin_*` constants is also fixed
2024-04-25 16:00:45 +08:00
98d7d62350 Fix wrong Tree column title position 2024-04-23 15:46:19 +08:00
c78e9c3fbd Fix TreeItem button handling
- Fix incorrect tooltip and `get_button_id_at_position()` when column
  title is visible and when RTL layout is used
- Take `button_margin`, `h_separation`, and `item_margin` into account
2024-04-18 18:51:36 +08:00
2543d192c3 Merge pull request #90842 from timothyqiu/revert-79792
Revert "Correctly display tooltips for buttons in Tree when they overlap cell content
2024-04-18 12:25:08 +02:00
00f0043227 Revert "Correctly display tooltips for buttons in Tree when they overlap cell content"
This reverts commit 8278a5f274.
2024-04-18 17:35:26 +08:00
0881c81c13 Fix non-embedded Windows resizing to match Viewport content scale factor 2024-04-17 09:30:16 -05:00
b345614adb Merge pull request #89977 from aqfranco/master
Fix TreeItem shows cell edit in the wrong column when `select_mode=Row` and TreeItem has multiple columns
2024-04-04 14:35:44 +02:00
5c19fcbd57 Fix #88892: TreeItem shows cell edit in the wrong column when SelectMode=Row and TreeItem has multiple columns
Editor would not be brought up when clicking on all but the last column on a TreeItem with SelectMode=Row with
multiple columns and when the editor was being brought up when clicking on the last column, it was editing the first column

Fixed draw_item, gui_input and edit_selected functions by setting set_meta parameter for each column
Fixed select_single_item function by changing selected_col depending on input
2024-03-28 15:31:42 +00:00
25f9f923a1 Rename some arguments called "position" 2024-03-27 01:28:24 +01:00
d339c71edc Fix empty_clicked signal when hide_root
fix
2024-03-22 09:19:56 +09:00