Thaddeus Crews
ba3482926d
Merge pull request #104444 from Delsin-Yu/fix-disabled-recursive-behavior-not-applied-on-ready
...
[GUI] Fix reparenting control does not update recursive mode cache properly
2025-03-29 10:16:35 +07:00
DE YU
04608fae4a
[GUI] Fix an issue where setting a control's recursive mode to disabled does not work on ready.
2025-03-29 06:34:11 +07:00
kobewi
75881f8322
Use initializer list in Arrays
2025-03-26 18:38:15 +07:00
kleonc
065d567116
Fallback Control.layout_mode to valid mode when child of non-container control
2025-03-25 17:08:44 +07:00
WinnerWind
d4bdb1a2b2
Use approximate values for resized.
...
This introduces two new booleans approx_pos_changed and approx_size_changed which are the pos_changed and size_changed booleans that are immune to floating point errors.
This aims to fix two bugs in one shot. #93832 and #48935
2025-03-21 22:01:54 +07:00
Rémi Verschelde
7ad0b9b16c
Merge pull request #97495 from Delsin-Yu/control_recursive_disable_children
...
[GUI] Implement properties that can recursively disable child controls' `Focus Mode` & `Mouse Filter`
2025-03-19 12:26:03 +07:00
Thaddeus Crews
3bc2821e26
Merge pull request #102372 from Rindbee/display-the-actual-used-theme-items-in-the-Inspector
...
Display the actual used theme items in the Inspector
2025-03-11 16:53:55 +07:00
DE-YU_H14
a49ca33a7f
Implement properties that recursively disables children's focus & mouse filter.
...
Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com>
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2025-03-07 22:34:58 +07:00
风青山
bef64baa18
Display the actual used theme items in the Inspector
...
Closes : godotengine/godot-proposals#4439 .
Allows viewing the default values of the currently used theme item
in the Inspector.
For theme item properties of resource type, editing the default
resource does not make sense. Use **Make Unique** to create a copy
before editing.
2025-02-07 07:29:30 +07:00
风青山
7230932dba
Fix ui navigation break
...
Use `is_visible_in_tree()` instead of `is_visible()` to check for
invisible controls.
2025-01-29 20:57:59 +07:00
风青山
f7397a0fee
Remove confusing `Control::is_top_level_control()`
...
It's hard to tell at first glance under what circumstances `is_top_level_control()`
returns `true`. So it's hard to decide when to use this method. And it seems to be
just a helper function for `Control::get_root_parent_control()`.
`is_top_level_control()` seems to only return `true` during entry and exit of canvas.
2025-01-28 00:29:23 +07:00
Rindbee
e197463525
Fix getting wrong focus neighbor when the control is in `ScrollContainer`
...
Exclude controls inside a `ScrollContainer` that are outside the visible area of
the `ScrollContainer` when looking for focus neighbors.
2025-01-16 07:55:56 +07:00
A Thousand Ships
a1846b27ea
Improve use of `Ref.is_null/valid`
...
Use `is_null` over `!is_valid` and vice versa.
2024-12-23 16:35:02 +07:00
Timo Schwarzer
1daa9a180b
Fix Control offset_* property types
2024-12-06 09:06:55 +07:00
rune-scape
d58b2e879f
Get rid of easily removable uses of const_cast
2024-12-01 17:50:13 +07:00
Michael Alexsander
58e79bfa9a
Compile certain `CanvasItem._edit_*()` functions with `DEBUG_ENABLED`
2024-11-02 15:43:18 +07:00
Adam Scott
0d350e7108
Set clang-format `RemoveSemicolon` rule to `true`
...
- Set clang-format `Standard` rule to `c++20`
2024-10-25 13:49:43 +07:00
Haoyu Qiu
009446a277
Add System Locale layout direction for Control and Window
2024-10-17 07:52:07 +07:00
Haoyu Qiu
78801f61da
Add auto translate mode for tooltips
2024-09-26 22:31:22 +07:00
rune-scape
0dde931bc9
StringName: Fix empty hash
...
+Fixed compat hashes
2024-09-09 13:30:02 +07:00
Rémi Verschelde
5216edeb14
Merge pull request #95500 from tetrapod00/zero-separation-focus-neighbor
...
Fix wrong focus neighbor for grid-aligned 0 separation controls
2024-09-08 23:21:18 +07:00
tetrapod00
c5ef2e2112
Add tie-breaking to find focus neighbor in Control
2024-09-06 18:07:48 +07:00
A Thousand Ships
9dc231366d
Fix super call in various `get_configuration_warnings` methods
2024-09-05 16:08:35 +07:00
Rémi Verschelde
ea26272075
Merge pull request #93800 from EAinsley/fix#92929
...
Fix incorrect size calculation when position is set on resized
2024-08-28 00:11:25 +07:00
Rémi Verschelde
e3695423b2
Merge pull request #93363 from kitbdev/pass-propagate
...
Clarify Mouse Filter Pass in the Inspector
2024-08-28 00:11:06 +07:00
Rémi Verschelde
588cf16630
Merge pull request #84840 from kleonc/control-get-transform-simplification
...
Simplify `Control` internal transform calculation
2024-08-26 23:28:08 +07:00
Rémi Verschelde
091212b4f1
Merge pull request #93602 from aaronp64/inspector_latency
...
Improve Editor Inspector/Theme item lookup performance
2024-08-22 00:10:26 +07:00
aaronp64
7593e55527
Improve Editor Inspector/Theme item lookup performance
...
Changes to reduce the latency between changing node selection in the editor and seeing the new node reflected in the Inspector tab
- Use Vector instead of List for ThemeOwner::get_theme_type_dependencies and related functions
- Use Vector instead of List for ThemeContext::themes, set_themes(), and get_themes()
- Add ClassDB:get_inheritance_chain_nocheck to get all parent/ancestor classes at once, to avoid repeated ClassDB locking overhead
- Update BIND_THEME_ITEM macros and ThemeDB::update_class_instance_items to use provided StringNames for call to ThemeItemSetter, instead of creating a new StringName in each call
These changes reduce the time taken by EditorInspector::update_tree by around 30-35%
2024-08-20 13:39:40 +07:00
kleonc
5be4eb9fc6
Simplify Control internal transform calculation
2024-08-19 12:14:41 +07:00
Haoyu Qiu
7343dc3a5d
Split TranslationServer into its own file
2024-08-15 15:00:47 +07:00
Rémi Verschelde
5da03541a1
Merge pull request #93749 from alvinhochun/gui-snap-to-pixel-round-halfway-to-positive
...
Change GUI controls pixel snap to round halfway towards positive infinity (`floor(x + 0.5)`)
2024-07-17 15:44:43 +07:00
Hendrik Brucker
1c47fd7089
Fix Control nodes emitting unnecessary resized signals
2024-07-05 01:41:21 +07:00
Ainsley Su
819c392ca3
Notify item_rect_changed before resized.
2024-07-01 11:54:07 +07:00
Alvin Wong
cc45c2cdd3
Change GUI controls pixel snap to round halfway to +ve infinity
2024-06-30 00:33:37 +07:00
kit
a3b944c41d
Clarify Mouse Filter Pass in the Inspector
2024-06-19 14:43:06 +07:00
kleonc
22b6f962d9
Invalidate Control global transform before notifying about resize / rect change
2024-05-30 10:10:24 +07:00
Haoyu Qiu
8652e9914f
Fix theme StyleBox override parameter completion
...
Also added completion for remove_theme_*_override.
2024-05-24 08:12:53 +07:00
kobewi
413c11357d
Use Core/Scene stringnames consistently
2024-05-13 23:41:07 +07:00
kobewi
a262d2d881
Add shorthand for using singleton string names
2024-05-11 18:53:08 +07:00
kobewi
82b6f9d7a7
Fetch argument options from ThemeDB
2024-05-07 15:02:50 +07:00
Silc Lizard (Tokage) Renew
57cd00aee9
Avoid incorrect computing anchor of Control node when reset on save
2024-05-05 08:33:37 +07:00
A Thousand Ships
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 +07:00
Haoyu Qiu
48f1e5b561
Don't store deprecated auto-translate property
2024-04-15 14:23:24 +07:00
kobewi
c3d2fab1e5
Remove Control z-index warning
2024-04-04 17:22:04 +07:00
Rémi Verschelde
cd4e4c0fcc
Merge pull request #89111 from AThousandShips/vec_use
...
Use `Vector*` component-wise `min/max/clamp` functions where applicable
2024-03-24 01:14:51 +07:00
Ricardo Buring
2ed2ccc2d8
Fixed Timestep Interpolation (2D)
...
Adds fixed timestep interpolation to the rendering server (2D only).
Switchable on and off with a project setting (default is off).
Co-authored-by: lawnjelly <lawnjelly@gmail.com>
2024-03-23 12:28:36 +07:00
A Thousand Ships
79ba22a73f
Use `Vector*` component-wise `min/max/clamp` functions where applicable
2024-03-20 13:47:42 +07:00
kleonc
f08e782916
Fix Control::set_global_position for rotated/scaled transforms
2024-03-15 04:19:52 +07:00
Rémi Verschelde
c1377920cd
Merge pull request #86743 from Mickeon/autocompletion-optimise-object
...
Optimise comparisons for Object's `get_argument_options`
2024-03-01 14:56:06 +07:00
Micky
cd2032a90b
Optimise Object's `get_argument_options`
2024-02-29 18:00:54 +07:00
Rémi Verschelde
810a0dbff1
Don't access Node3D/Node2D/Control global transform in `reparent` unless needed
...
Fixes #89002 .
Co-authored-by: Tamás Gálffy <ezittgtx@gmail.com>
2024-02-29 14:07:48 +07:00
Raul Santos
5ba92e5a57
Fix some DEFVALs to use the right type
...
- Use `StringName()` in DEFVAL for StringNames.
- Use `Variant()` in DEFVAL for Variants.
2024-02-23 01:50:18 +07:00
Rémi Verschelde
21f0529aa9
Revert "Update Node::get_configuration_warnings signature"
...
This reverts commit d3852deaa4 .
2024-02-17 19:03:21 +07:00
Michael Alexsander
7b42c24550
Make auto translation inheritable
2024-02-15 16:51:19 +07:00
A Thousand Ships
684752e75b
Replace error checks against `size` with `is_empty`
2024-02-09 12:50:15 +07:00
RedMser
d3852deaa4
Update Node::get_configuration_warnings signature
2024-02-08 23:05:20 +07:00
Rémi Verschelde
6c2f412cc7
Merge pull request #84760 from KoBeWi/ultimate_get_property_list_reloaded
...
Fetch override list from ThemeDB
2024-01-29 21:32:10 +07:00
kobewi
7d6ded2027
Fetch override list from ThemeDB
2024-01-29 16:41:57 +07:00
A Thousand Ships
15369fdb1d
Remove unnecessary `this->` expressions
2024-01-29 09:59:18 +07:00
风青山
0c6b6fe749
Fix issue where `set_global_position(global_position)` in `Control` resulted in a different result than `global_position`
...
Previously, the case where the pivot point was not at the origin was ignored.
2024-01-23 00:05:11 +07:00
kobewi
0e8f90f4c8
Update deferred calls to use Callables
2024-01-09 16:11:47 +07:00
Micky
ca2f340384
Fix missing autocompletion for inheriting classes
2024-01-03 00:13:04 +07:00
bruvzg
932174fedf
[Editor] Add option to override editor UI layout direction.
2023-11-17 14:56:45 +07:00
Rémi Verschelde
f7a701587e
Merge pull request #84662 from YuriSizov/gui-warn-about-autowrapping
...
Warn about autowrapped labels in containers
2023-11-09 18:09:25 +07:00
Yuri Sizov
58a3cfa192
Warn about autowrapped labels in containers
2023-11-09 16:33:46 +07:00
kit
d24d73ba31
Make mouse-enter/exit notifications match mouse event propagation
...
`NOTIFICATION_MOUSE_ENTER` and `NOTIFICATION_MOUSE_EXIT` now includes
the areas of children control nodes if the mouse filters allow it.
In order to check if a Control node itself was entered/exited, the newly
introduced `NOTIFICATION_MOUSE_ENTER_SELF` and
`NOTIFICATION_MOUSE_EXIT_SELF` can be used.
Co-authored-by: Markus Sauermann <6299227+Sauermann@users.noreply.github.com>
2023-11-09 09:11:59 +07:00
Yuri Sizov
53172d9860
Add more context to some `Window` errors
2023-09-30 21:44:05 +07:00
Rémi Verschelde
e4cfd4e26a
Merge pull request #82195 from AThousandShips/radian_fix
...
Replace `radians` range hint with `radians_as_degrees`
2023-09-25 17:18:38 +07:00
Rémi Verschelde
3408aab7c6
Merge pull request #76027 from AThousandShips/focus_direction
...
Expose finding valid focus neighbors of a `Control` by side
2023-09-25 17:17:33 +07:00
A Thousand Ships
e45927b2f2
Replace `radians` range hint with `radians_as_degrees`
2023-09-25 08:50:19 +07:00
Yuri Sizov
2924bfd4d3
Register theme properties with ThemeDB
2023-09-11 13:45:23 +07:00
Yuri Sizov
58126e479c
Introduce the concept of global theme contexts
...
This commit adds the default theme context, which replaces
the need to manually check the project and the default theme
all the time; simplifies related code.
It also adds framework for custom theme contexts, to be used
by the editor. Custom contexts can be attached to any node,
and not necessarily a GUI/Window node. Contexts do no break
theme inheritance and only define which global themes a node
uses as a fallback.
Contexts propagate NOTIFICATION_THEME_CHANGED when one of their
global themes changes. This ensures that global themes act just
like themes assigned to individual nodes and can be previewed
live in the editor.
2023-09-06 19:40:43 +07:00
kobewi
6de34fde27
Add EditorStringNames singleton
2023-09-03 19:58:18 +07:00
A Thousand Ships
e70b83c7a0
Expose finding valid focus neighbors of a `Control` by side
...
Exposes the functionality used for ui navigation
2023-08-24 18:25:35 +07:00
Markus Sauermann
152572ac38
Fix global transform validity for `Node2D` and `Control`
...
Set global transform to invalid when changing transform
2023-08-08 12:22:55 +07:00
kobewi
de4a3fa151
Unify and streamline connecting to Resource changes
2023-07-17 19:35:57 +07:00
Rémi Verschelde
1b5620d2a9
Merge pull request #78009 from YuriSizov/gui-gently-massage-minimal-size
...
Ensure that controls update all their sizing information when required
2023-06-12 14:14:20 +07:00
Ninni Pipping
0c16082e1e
Use `get_node_or_null` when null checks are present
...
Avoids duplicate or unnecessary errors
2023-06-10 13:22:56 +07:00
Ninni Pipping
dcd2b883eb
Use NULL instead of COND checks when appropriate
...
Restricted to scene
2023-06-10 08:56:30 +07:00
Yuri Sizov
ccaab0e590
Ensure that controls update all their sizing information when required
2023-06-08 17:41:03 +07:00
Yuri Sizov
df26066ce9
Revert "Make sure that `data.last_minimum_size` is consistent with `get_combined_minimum_size()` at the same time"
...
This reverts commit 594852caf1 .
2023-06-06 20:55:03 +07:00
bruvzg
66ea0006e0
Fix incorrect node placement in RTL layout when parent is non-Control canvas item.
2023-06-06 11:49:05 +07:00
Rindbee
594852caf1
Make sure that `data.last_minimum_size` is consistent with `get_combined_minimum_size()` at the same time
...
Move the code for switching `data.minimum_size_valid` in `Control::update_minimum_size()`
to `Control::_update_minimum_size()`, make sure to switch `data.minimum_size_valid` to
`false` only before updating `data.last_minimum_size` , so that it will remain consistent
with `get_combined_minimum_size()`.
2023-06-01 19:02:42 +07:00
Markus Sauermann
ce10ca6979
Create a virtual mouse move event after moving child nodes
...
This updates mouse cursor and mouse-over-states without the need
for additional mouse movements.
2023-05-29 22:46:19 +07:00
Juan Linietsky
0a9f72d5a8
Make more base nodes thread safe
...
Ongoing work to make more of the base nodes thread safe.
2023-05-15 16:54:10 +07:00
Rémi Verschelde
6aac8af6f1
Merge pull request #69318 from Sauermann/fix-refresh-gui-events
...
Fix scene reload crash related to mouse cursor update
2023-04-25 15:36:26 +07:00
Yuri Sizov
4fed87320c
Use Point2 consistently in Control methods
...
While Size2 and Point2 are just aliases,
which is why this doesn't fail compilation,
it's nice to have things consistent.
2023-04-13 15:26:50 +07:00
Juan Linietsky
104392ef4e
Remove NOTIFICATION_MOVED_IN_PARENT
...
* This notification makes node children management very inefficient.
* Replaced by a NOTIFICATION_CHILDREN_CHANGED (and children_changed signal).
* Changed Canvas code (and similar) to use the above signal, to perform more efficiently.
This PR breaks compatibility (although this notification was very rarely used, even within the engine), but provides an alternate way to do the same.
It is required for the changes in #75627 to be entirely effective.
2023-04-06 13:57:13 +07:00
Yuri Sizov
91ff34b5b5
Add a warning when trying to access theme items too early
2023-04-03 18:01:10 +07:00
Haoyu Qiu
5a5fd33e42
More i18n improvements
...
* Make placeholder in editor layout dialog translatable.
* Make messages in scene import settings dialog translatable.
* Mark theme override property categories for translation.
2023-03-27 22:24:01 +07:00
Yuri Sizov
8f2c41b4dd
Merge pull request #73818 from kilojool/virtual_get_tooltip
...
Add missing virtual bind for control::get_tooltip
2023-03-25 14:14:10 +07:00
kobewi
8f8178bda6
Fix auto-translations in editor
2023-03-22 23:57:12 +07:00
kilojool
a95cd3872a
Add missing virtual bind for control::get_tooltip
2023-03-21 17:39:51 +07:00
bruvzg
82d7923c65
Improve layout direction/locale automatic selection.
2023-02-22 08:37:14 +07:00
Markus Sauermann
5bb66d3cfb
Fix scene reload crash caused by mouse cursor update
...
After a scene reload a mouse cursor updates is performed via a
InputEventMouseMotion, that is exposed to the user.
The state of Input is however not adjusted to this InputEventMouseMotion
which can lead to inconsistencies.
This PR makes sure, that it is not exposed to the user.
It utilizes the method of Viewport::_process_picking for marking
events that are not sent to the user, so that this function doesn't
need to be changed.
2023-02-10 01:16:23 +07:00
Kabiir
17ee6fcf03
Fix description and argument name in Control._has_point
2023-02-07 02:29:28 +07:00
Yuri Sizov
9d3b4b0b40
Merge pull request #72204 from MinusKube/anchorable_rect_editor_bug
...
Fix get_parent_anchorable_rect() not returning the correct size in some cases
2023-02-06 16:28:19 +07:00
Markus Sauermann
3bc426c9d8
Fix toplevel nomenclature
...
toplevel was 3.x
top_level is 4.x
2023-02-02 17:37:41 +07:00
Rémi Verschelde
4cfdd25384
Merge pull request #67507 from Sauermann/fix-toplevel-root-control-node
...
Fix event propagation to child after set_as_toplevel
2023-01-31 15:55:46 +07:00
MinusKube
0f512a68dd
Fix get_parent_anchorable_rect() not returning the correct size in some cases
2023-01-28 20:09:24 +07:00