Commit Graph

2248 Commits

Author SHA1 Message Date
Rémi Verschelde
16ee94a953
Merge pull request #99843 from KoBeWi/easy_windows
Add helper method to get Window from ID
2024-11-29 22:51:45 +01:00
Rémi Verschelde
cf165a1d29
Merge pull request #99739 from ydeltastar/fix-default-environment
Fix default `Environment` project setting and loading
2024-11-29 22:51:14 +01:00
Rémi Verschelde
05e93a6010
Merge pull request #99691 from Sauermann/fix-consume-mouse-over
Rename `SubViewportContainer` option `consume_drag_and_drop` to `mouse_target`
2024-11-29 22:51:10 +01:00
kobewi
e0304a7d00 Add helper method to get Window from ID 2024-11-29 21:15:23 +01:00
Markus Sauermann
f53a220a72 Fix physics picking when hovering an embedded window
When the mouse is hovering an embedded window, it is still considered
within the main viewport.
Previously in this case physics picking was executed, as if no embedded
window was there.

This PR introduces an additional check to exclude these cases.
2024-11-27 22:29:42 +01:00
ydeltastar
8793764ba6
Fix default environment project setting and loading 2024-11-27 14:15:27 -03:00
Thaddeus Crews
9c300a6c05
Merge pull request #80965 from Calinou/viewport-add-get-stretch-scale-factor
Add a Viewport method to get automatically computed 2D stretch transform
2024-11-27 10:47:12 -06:00
Markus Sauermann
003647972f Rename consume_drag_and_drop to mouse_target
The functionality of the parameter is not limited to drag-and-drop
operations, but it has also other uses.
So its name should not be tied to drag-and-drop.

The API was created in the not yet released Godot 4.4-dev6, so this
change should not be considered compatibility breaking.
2024-11-25 21:36:29 +01:00
Thaddeus Crews
0eca686191
Merge pull request #99270 from Sauermann/fix-svc-drop-config
Introduce a `SubViewportContainer` config for drag-and-drop target locations
2024-11-21 17:56:48 -06:00
Rémi Verschelde
285954659d
Merge pull request #96721 from aXu-AP/tooltip-distance
Fix tooltip appearing in old place, on movement
2024-11-20 17:03:08 +01:00
Hugo Locurcio
0cf99cf95d
Add a Viewport method to get automatically computed 2D stretch transform
`Viewport.get_stretch_transform()` returns the automatically computed
2D stretch transform. Combined with `Transform2D.get_scale()`, this is
useful when using the `canvas_items` stretch mode in a project.

There are many situations where knowing this factor is useful:

- Divide Camera2D zoom to keep the size of the 2D game world identical
  regardless of the 2D scale factor (so that UI elements can still be scaled).
- Make certain controls always drawn at 1:1 scale
  (e.g. for the crosshair in a FPS). This is done by dividing the Control
  node's scale by the scale factor.
2024-11-19 23:11:13 +01:00
Markus Sauermann
117158d271 Introduce a SubViewportContainer config for drag-and-drop targets
With the drag-and-drop rewrite, `SubViewportContainer` nodes were no
longer available as drop-locations.

This PR introduces a configuration option, that allows
`SubViewportContainer` to be considered as drop-location, but disables the
`Control` nodes inside its `SubViewport` children as drop-location.
2024-11-19 23:06:41 +01:00
A Thousand Ships
68f638cf02
Use (r)find_char instead of (r)find for single characters 2024-11-17 10:02:18 +01:00
Pāvels Nadtočajevs
932b2269f8 Fix missing native file dialog title translation. 2024-11-14 14:48:52 +02:00
Thaddeus Crews
cc6ee3e956
Merge pull request #98713 from dalexeev/core-fix-callable-get-bound-arguments
Core: Fix `Callable.get_bound_arguments{,_count}()` return incorrect data
2024-11-12 12:13:04 -06:00
Thaddeus Crews
0ad3181d14
Merge pull request #98951 from AThousandShips/fix_more_super_call
Fix a few more super calls in `get_configuration_warnings` methods
2024-11-12 09:27:33 -06:00
Thaddeus Crews
925b690c98
Core: Integrate Ref::instantiate where possible 2024-11-10 12:41:26 -06:00
A Thousand Ships
26938086eb
Fix a few more super calls in get_configuration_warnings methods
A few missed last pass and one incorrect from that pass
2024-11-08 14:58:37 +01:00
Fabio Alessandrelli
7cd850b909 [Debugger] Move quit shortcut configuration to the SceneDebugger 2024-11-07 15:03:17 +01:00
aXu-AP
be349fa6d3 Fix tooltip appearing in old place, on movement
Fixes tooltip appearing in editor on old position of mouse.
Fixes tooltip appearing even if mouse is in steady motion (now accepts max 5 px movement).
2024-11-05 16:51:23 +02:00
Danil Alexeev
e379cc76e5
Core: Fix Callable.get_bound_arguments{,_count}() return incorrect data 2024-11-04 22:41:56 +03:00
Michael Alexsander
58e79bfa9a
Compile certain CanvasItem._edit_*() functions with DEBUG_ENABLED 2024-11-02 15:43:18 -03:00
Michael Alexsander
16524a8a01
Add "Game" editor for better runtime debugging 2024-10-30 11:42:17 -03:00
Thaddeus Crews
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
Adam Scott
0d350e7108
Set clang-format RemoveSemicolon rule to true
- Set clang-format `Standard` rule to `c++20`
2024-10-25 13:49:43 -04:00
Haoyu Qiu
6424b201e2 Don't override auto translate mode of custom tooltip 2024-10-25 16:13:45 +08:00
Thaddeus Crews
f25c082c40
Merge pull request #98490 from KoBeWi/pointer_to_canvas
Improve `make_canvas_position_local()` description
2024-10-24 13:22:52 -05:00
kobewi
e0c7e063e5 Improve make_canvas_position_local description 2024-10-24 15:10:20 +02:00
Haoyu Qiu
9aea7cbd15 Fix some flickering tooltips 2024-10-24 08:34:29 +08:00
Thaddeus Crews
7dbea98c49
Merge pull request #97005 from Repiteo/core/window-corner-style
Core: Add `DisplayServer` flag for sharp corners
2024-10-21 16:39:25 -05:00
Thaddeus Crews
f8c4a683d7
Core: Add DisplayServer flag for sharp corners 2024-10-18 11:20:21 -05:00
Haoyu Qiu
009446a277 Add System Locale layout direction for Control and Window 2024-10-17 07:52:07 +08:00
Haoyu Qiu
6f35915622 Allow Control to show custom tooltip when tooltip text is empty
Co-Authored-By: bruvzg <7645683+bruvzg@users.noreply.github.com>
2024-10-08 15:46:26 +08:00
Rémi Verschelde
14eee2b930
Merge pull request #97240 from KoBeWi/wrong_number
Print error on invalid `call_group()` calls
2024-10-04 22:43:30 +02:00
Rémi Verschelde
6d9a797ea4
Merge pull request #97624 from timothyqiu/atrn
Fix `atr_n()` behavior when auto translation is disabled
2024-10-04 11:21:50 +02:00
Haoyu Qiu
210810bacb Fix atr_n() behavior when auto translation is disabled 2024-09-29 22:59:33 +08:00
Haoyu Qiu
6516ca6b11 Parse fragment from URL 2024-09-27 19:42:30 +08:00
Haoyu Qiu
78801f61da Add auto translate mode for tooltips 2024-09-26 22:31:22 +08:00
Thaddeus Crews
9f9ee0c813
SCons: Add unobtrusive type hints in SCons files 2024-09-25 09:34:35 -05:00
kobewi
22ccfc5a39 Print error on invalid call_group() calls 2024-09-20 17:20:03 +02:00
A Thousand Ships
203d3be200
[Core] Add way to check if a signal has any connections
Added to `Object` and `Signal`
2024-09-20 16:39:09 +02:00
Rémi Verschelde
7ce8e4fd6b
Merge pull request #97159 from noidexe/Expose-viewport-get-audio-listener
Expose Viewport methods to get current 2D/3D audio listener
2024-09-20 16:06:39 +02:00
Rémi Verschelde
7e62565f1e
Merge pull request #95787 from timothyqiu/domestic
Add translation domain
2024-09-20 16:06:23 +02:00
Lisandro Lorea
bdcee836ad Expose Viewport::get_audio_listener_2d and Viewport::get_audio_listener_3d to scripting
Document exposed methods

Apply suggestions from code review

Co-authored-by: Micky <66727710+Mickeon@users.noreply.github.com>

Document default behavior when no audio listeners are active
2024-09-19 18:43:33 -03:00
Rémi Verschelde
2a8d30aa9f
Merge pull request #97029 from Hilderin/fix-viewport-texture-must-be-set-to-use-it
Fix Viewport Texture must be set to use it
2024-09-18 11:15:39 +02:00
Hilderin
c11107b1fb Fix Viewport Texture must be set to use it 2024-09-17 18:18:07 -04:00
Haoyu Qiu
c5d147b9b5 Allow configuring which translation domain Object.tr uses 2024-09-17 13:09:44 +08:00
Rémi Verschelde
ab55a40f0c
Merge pull request #97070 from KoBeWi/snaming_ur_inputs
Use `SNAME` for `ui` actions in Viewport
2024-09-16 15:25:47 +02:00
kobewi
d805f38dba Use SNAME for ui actions in Viewport 2024-09-16 14:09:26 +02:00
Rémi Verschelde
391849d232
Merge pull request #96867 from L2750558108/remove-gui-key-event-accepted-shit
Remove useless `Viewport::gui.key_input_accepted`
2024-09-16 13:35:13 +02:00