Commit Graph

236 Commits (cb1569345a6f17da08241e645ab03cb2e1b78d2f)

Author SHA1 Message Date
Silc Lizard (Tokage) Renew bf22eb25e3 Add IKModifier3D 2025-11-04 02:38:48 +07:00
Thaddeus Crews e560ea47d4
Merge pull request #70646 from KoBeWi/relatable_offset
Add `pivot_offset_ratio` property to Control
2025-10-13 12:30:10 +07:00
chocola-mint 19c47c5d99 Remove `#include "scene/main/timer.h"` from `control.h` 2025-10-05 14:41:06 +07:00
kobewi 618afcffa6 Add pivot_offset_ratio property to Control 2025-09-30 15:27:52 +07:00
Thaddeus Crews 035f5d3055
Merge pull request #110763 from Ivorforce/object-derives-from
Use `AncestralClass` to speed up `Object::cast_to` when possible.
2025-09-22 13:28:45 +07:00
Lukas Tenbrink 96619d46a1 Use `AncestralClass` to speed up Object::cast_to when possible. 2025-09-22 13:21:51 +07:00
Michael Alexsander aeb3a45c97
Hide `Control` focus when given via mouse input 2025-09-19 13:43:29 +07:00
Pāvels Nadtočajevs aff5b413aa
Move some accessibility properties from Node to Control 2025-06-08 16:25:28 +07:00
Pāvels Nadtočajevs 25ae5c8ab4
Revert "Fix #100536: Control set_position resizes offsets/anchors"
This reverts commit ca57fe1db4.
2025-05-16 14:21:18 +07:00
Pāvels Nadtočajevs db0c0a9182
Fix `FOCUS_ACCESSIBILITY` grabbing focus when it is not supposed to, forward `GraphNode` key input to `GraphEdit`. 2025-04-27 00:45:11 +07:00
Thaddeus Crews 00bd421089
Merge pull request #105222 from kitbdev/fix-mouse-filter-recursive-and-rename
Fix and rename mouse filter recursive behavior and focus mode recursive behavior
2025-04-16 10:45:12 +07:00
kit d16e8b7ca4 Fix and rename mouse filter recursive behavior
and focus mode recursive behavior.
2025-04-09 23:45:03 +07:00
Thaddeus Crews c6394a1b8b
Merge pull request #104357 from FilipeAlexCosta/control-set-position
Fix `Control.set_position` resizes offsets/anchors
2025-04-09 18:11:55 +07:00
Thaddeus Crews c7fc877895
Merge pull request #101745 from Rindbee/remove-is_top_level_control
Remove confusing `Control::is_top_level_control()`
2025-04-09 08:51:46 +07:00
Pāvels Nadtočajevs b106dfd4f9
Base accessibility API. 2025-04-08 20:14:28 +07:00
Filipe Alexandre Francisco Costa ca57fe1db4 Fix #100536: Control set_position resizes offsets/anchors
The set_position method computes the anchors/offsets to match a
rectangle at the given position with size "size_cache". However, when
the Control's combined minimum size is larger than the size obtained
through the offsets and anchors, "size_cache" is set to be as large as
the combined minimum size. Therefore, when position is set while the
combined minimum size is larger than the rectangle given by the anchors
and offsets, it would resize these two fields, which would then stop
the Control from shrinking when its combined minimum size decreased. To
fix this, set_position now uses the size given by the offsets and
anchors instead of the "size_cache" field. This way, the rectangle
denoted by the offsets and anchors is simply moved, without being
resized, enabling the Control to shrink automatically when its combined
minimum size decreases. I also added a test case to ensure that the
Control shrinks correctly after setting its position while it has a
larger custom minimum size than the one obtained through the offsets
and anchors.
2025-03-31 08:50:00 +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
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
Thaddeus Crews 324512e11c
Style: Replace header guards with `#pragma once` 2025-03-07 17:33:47 +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
风青山 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
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
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
Silc Lizard (Tokage) Renew 57cd00aee9 Avoid incorrect computing anchor of Control node when reset on save 2024-05-05 08:33:37 +07:00
Micky cd2032a90b Optimise Object's `get_argument_options` 2024-02-29 18:00:54 +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
RedMser d3852deaa4 Update Node::get_configuration_warnings signature 2024-02-08 23:05:20 +07:00
bruvzg 932174fedf
[Editor] Add option to override editor UI layout direction. 2023-11-17 14:56:45 +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
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
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
Nana Sakisaka 3dbd47ecb6 Expose Control::_get_drag_data() as non-const function 2023-05-24 06:09:45 +07:00
Yuri Sizov 91ff34b5b5 Add a warning when trying to access theme items too early 2023-04-03 18:01:10 +07:00
kilojool a95cd3872a Add missing virtual bind for control::get_tooltip 2023-03-21 17:39:51 +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
Rémi Verschelde 65883cc73b
Merge pull request #71598 from bruvzg/gdscript_bidi_override
Implement BiDi override mode for GDScript source.
2023-01-19 19:33:18 +07:00
kobewi c0083e431b Cleanup unused engine code v2 2023-01-19 13:02:18 +07:00
bruvzg 5361ec9f43
Implement BiDi override mode for GDScript source. 2023-01-18 19:22:20 +07:00