Commit graph

598 commits

Author SHA1 Message Date
Thaddeus Crews
f27f917d32
Merge pull request #107955 from lodetrick/mouse-signals
Fix `mouse_entered` and `mouse_exited` Signals being emitted too early
2025-09-19 09:17:04 -05:00
Summersay415
bf5fada0b1 Revert "Fix incorrect anchor preset when custom offset is set" 2025-08-07 12:55:59 +07:00
Thaddeus Crews
281ce842fd
Merge pull request #108442 from limuy2022/master
Fix incorrect anchor preset when custom offset is set
2025-07-15 08:04:26 -05:00
limuy
21b1530cd4 Fix incorrect anchor preset when custom offset is set 2025-07-10 19:19:05 +08:00
Thaddeus Crews
e748514112
Merge pull request #105835 from bruvzg/edited_scene_direction
Improve edited scene layout direction detection.
2025-07-09 11:33:11 -05:00
A Thousand Ships
f11aff3841
Editor: Restructure editor code
Moving various editor files into sub folders to reduce clutter
2025-07-04 18:18:22 +02:00
Logan Detrick
c03a7b7893 Delay Mouse signals until after internal processing 2025-06-24 14:29:17 -07:00
Rémi Verschelde
ae484828bb
Merge pull request #107408 from Ivorforce/node-path-string-explicit
Make conversions from `NodePath` to `String` explicit.
2025-06-12 22:49:03 +02:00
LuoZhihao
8ba4656ea3 Compile out editor-only logic within validate_property in games 2025-06-12 12:54:19 +08:00
Lukas Tenbrink
e2931a5c19 Make conversions from NodePath to String explicit. 2025-06-11 16:50:27 +02:00
Pāvels Nadtočajevs
aff5b413aa
Move some accessibility properties from Node to Control 2025-06-08 16:25:28 +03: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 +03:00
Pāvels Nadtočajevs
4976b38dec
Revert "Fix unexpected control position change when left/top offsets not match pos_cache"
This reverts commit 49c7966042.
2025-05-16 14:19:51 +03:00
Jesusemora
b22eba1285
Show theme_type_variations in the inspector on Controls that inherit a theme
`theme_type_variation`s are now shown in the children and children of children
that inherit a theme from a parent `Control` node.
2025-05-13 00:56:06 +02:00
2750558108
49c7966042 Fix unexpected control position change when left/top offsets not match pos_cache 2025-05-07 18:46:40 +08:00
kit
e6cb7affdc Allow Control Rect tool to not snap to pixel 2025-05-01 19:47:17 -04:00
lawnjelly
f8f350a32a Add GLOBAL_GET cached macros.
GLOBAL_GET is an expensive operation which should not be used each frame / tick.
This PR adds macros which do a cheaper revision check, and only call the expensive GLOBAL_GET when project settings have changed.

Co-authored-by: Lukas Tenbrink <lukas.tenbrink@gmail.com>
2025-04-30 15:08:50 +01:00
Haoyu Qiu
3578aa6acc Fix item translation and icon in the Anchors Preset dropdown
- Some items were not translated.
- Item icons did not react to light/dark theme switch.
2025-04-28 19:50:24 +08:00
Pāvels Nadtočajevs
03048aa94a
Improve edited scene layout direction detection. 2025-04-28 07:57:26 +03:00
Thaddeus Crews
1b4ed4c038
Merge pull request #105595 from bruvzg/focus_fx
Fix `FOCUS_ACCESSIBILITY` grabbing focus when it is not supposed to, forward `GraphNode` key input to `GraphEdit`.
2025-04-27 19:21:34 -05:00
Thaddeus Crews
1a2a1b07df
Merge pull request #105799 from Repiteo/scons/enum-conversion-warnings
SCons: Add enum conversion warning
2025-04-27 19:21:23 -05:00
Thaddeus Crews
3947cbe3b2
Merge pull request #104386 from Repiteo/core/cpp-math
Core: Replace C math headers with C++ equivalents
2025-04-27 19:21:22 -05: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 +03:00
Thaddeus Crews
dc9c34f0c6
SCons: Add enum conversion warning 2025-04-26 12:06:20 -05:00
Max Piepenbrink
cf8455c52d Fix regression causing jittery canvas transforms
This PR https://github.com/godotengine/godot/pull/104451 introduced
a tricky regression. Canvas item transforms could risk not being
updated for multiple frames due to the conditional on the line
in this commit. Before the "approx_pos|size_changed" fix, the
transform would get updated incidentally either way. But now there's
a gap where (pos_changed && !size_changed) may not be true for a few
frames and there's nothing else left to trigger a transform update.

The fix is quite simple, for updating the canvas item transform
we remain trigger happy around position changes, but respect the
approx_size_changed.
2025-04-16 23:59:05 -07:00
Thaddeus Crews
ad40939b6f
Core: Replace C math headers with C++ equivalents
- Minor restructuring to ensure `math_funcs.h` is the central point for math functions
2025-04-16 15:49:02 -05: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 -05:00
Thaddeus Crews
94282d88f9
Core: Use Math namespace for constants 2025-04-10 16:29:30 -05:00
kit
d16e8b7ca4 Fix and rename mouse filter recursive behavior
and focus mode recursive behavior.
2025-04-09 23:45:03 -04: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 -05:00
Thaddeus Crews
36a135ca62
Merge pull request #104451 from WinnerWind/fix_resized_logic_for_control
Fix excessively calling resized and floating point errors in Control.
2025-04-09 18:11:35 -05: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 -05:00
Pāvels Nadtočajevs
b106dfd4f9
Base accessibility API. 2025-04-08 20:14:28 +03:00
Thaddeus Crews
b7c452a36d
Merge pull request #104614 from kleonc/control_layout_mode_fallback_to_valid_value
Fallback `Control.layout_mode` to valid mode when child of non-container control
2025-04-07 08:43:22 -05: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 +01:00
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 -05: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 +08:00
kobewi
75881f8322 Use initializer list in Arrays 2025-03-26 18:38:15 +01:00
kleonc
065d567116 Fallback Control.layout_mode to valid mode when child of non-container control 2025-03-25 17:08:44 +01: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 +05:30
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 +01: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 -05: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 +08: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 +08: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 +08: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 +08: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 +08: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 -05:00
Timo Schwarzer
1daa9a180b
Fix Control offset_* property types 2024-12-06 09:06:55 +01:00
rune-scape
d58b2e879f Get rid of easily removable uses of const_cast 2024-12-01 17:50:13 -08:00