Commit graph

461 commits

Author SHA1 Message Date
Rémi Verschelde
3b11e33a09
clang-format: Disable alignment of operands, too unreliable
Sets `AlignOperands` to `DontAlign`.

`clang-format` developers seem to mostly care about space-based indentation and
every other version of clang-format breaks the bad mismatch of tabs and spaces
that it seems to use for operand alignment. So it's better without, so that it
respects our two-tabs `ContinuationIndentWidth`.
2021-10-28 15:19:35 +02:00
PouleyKetchoupp
d5847f1cb4 Fix errors in mouse detection when removing collision object from tree
Now behaves the same way as ui elements, mouse exit is skipped when the
object is removed from the tree.
2021-10-20 09:10:59 -07:00
Rémi Verschelde
56078cca90
Merge pull request #53630 from timothyqiu/viewport-recursion 2021-10-11 10:02:22 +02:00
Haoyu Qiu
7ecb133b22 Fix Viewport::handle_input_locally related infinite recursion 2021-10-10 18:10:28 +08:00
mashumafi
80dc1cc412 Executing AcceptDialog.push_input no longer crashes 2021-10-09 20:33:29 +00:00
Hugo Locurcio
73c6e19acc
Allow any floating-point value as a 3D rendering scale option
This allows for finer control over 3D rendering resolution.
Supersampling can also be performed by setting a 3D rendering
resolution above 1.0, which is useful for offline rendering or
for very high-end GPUs.
2021-10-08 18:22:10 +02:00
jitspoe
2ceba818c3
Fix ViewportTexture error when viewport is used from a child scene
Fix invalid errors when a separate child scene file contains a viewport and
that viewport is used for a texture in the current scene.

Fixes #27790.
2021-10-05 12:21:06 +02:00
Eric M
caac2e1a87 Fix focus shortcuts triggering incorrectly 2021-09-21 12:24:07 +10:00
Wilson E. Alvarez
f3a564f9a5
Rename Listener2D/Listener3D to AudioListener2D/AudioListener3D 2021-09-16 17:51:51 -04:00
Rémi Verschelde
70ba366743
Merge pull request #50375 from Paulb23/code_edit_unit_tests 2021-09-13 21:51:20 +02:00
Rémi Verschelde
8ecc571158
Merge pull request #49063 from Calinou/remove-16x-msaa
Remove 16× MSAA support due to driver bugs and low performance
2021-09-13 17:34:04 +02:00
kobewi
6b68445e4d Fix multiple definitions of Listener2D 2021-09-12 21:19:37 +02:00
Max Hilbrunner
06e2a02253 Clean up Viewport, remove dead code. 2021-09-10 16:58:33 +02:00
Max Hilbrunner
68563b5760
Merge pull request #52431 from dozingpip/patch-1
Remove dead code from Viewport::_gui_input_event
2021-09-10 16:34:28 +02:00
Pip
d7a6f8990a
Remove dead code from Viewport::_gui_input_event 2021-09-06 03:11:02 -04:00
Paulb23
cd6b11222c Prevent crash on startup if no audio server 2021-09-01 16:46:04 +01:00
kobewi
f2cb0a8d4b Add Listener2D 2021-08-31 16:53:14 +02:00
Michael Alexsander
565ba91d28
Merge pull request #51906 from requizm/fix/49077
Fix tooltips don't appear for PopupMenus
2021-08-28 15:43:02 +00:00
Ellen Poe
3598d300cb Do all audio mixing in the AudioServer 2021-08-27 10:41:57 -07:00
Bastiaan Olij
64626cc435 Optionally scale 3D render content 2021-08-26 20:48:40 +10:00
Hugo Locurcio
7192852da3
Remove 16× MSAA support due to driver bugs and low performance
In the `master` branch, 16× MSAA caused the entire system to freeze
on NVIDIA GPUs. This is likely caused by graphics drivers not actually
implementing 16× MSAA, but combining 8× MSAA with 2× SSAA instead.

On top of that, modern shader complexity makes 16× MSAA very difficult
to use while keeping a good framerate. 8× MSAA is hard enough to use
as it is.
2021-08-25 07:56:27 +02:00
reduz
5cecdfa8af Entirely removes BIND_VMETHOD in favor of GDVIRTUAL
* `_gui_input`, `_input`, `_unhandled_input` and `_unhandled_key_input` are now regular C++ virutal functions.
* Everything else converted to GDVIRTUAL
* BIND_VMETHOD is gone, always use the new syntax from now on.

Creating `_gui_input` method and using the binder to register events will no longer work, simply override the virtual function now.
2021-08-23 08:10:13 -03:00
requizm
6f3d8fa228 Fix tooltip message working incorrectly in PopupMenu
fix
2021-08-20 23:06:00 +03:00
Aaron Franke
7094ccfbe9
Disable Node3D when compiling without 3D and fix disable_3d option 2021-08-13 08:59:48 -05:00
Rémi Verschelde
85e315d6e8
Merge pull request #51607 from aaronfranke/includes
Fix some unnecessary includes
2021-08-13 14:38:56 +02:00
Aaron Franke
eb4902a455
Fix some unnecessary includes 2021-08-13 00:27:38 -05:00
Hugo Locurcio
7612cff432
Use the Unicode multiplication symbol where relevant 2021-08-12 21:45:33 +02:00
Rémi Verschelde
dce488d8f7
Merge pull request #49417 from Bhu1-V/gsoc-cmd-plt
Command Palette For Godot
2021-08-10 18:55:22 +02:00
Aaron Franke
339687e04f
Organize methods in Viewport and explicitly name 3D methods with 3D 2021-08-10 09:10:34 -05:00
Bhuvan Vemula
a0a019a998 Added EditorCommandPalette 2021-08-09 17:41:50 +05:30
Michael Alexsander
94a64d557e Add auto_translate toggle for automatic translation 2021-07-29 18:30:34 -03:00
Michael Alexsander
79fc188fc4 Multiple cosmetic fixes for embedded windows 2021-07-27 23:55:06 -03:00
Rémi Verschelde
92299989bd
Use Ref<T> references as iterators where relevant
And const when possible.
2021-07-26 19:27:11 +02:00
Aaron Franke
4e6efd1b07
Use C++ iterators for Lists in many situations 2021-07-23 17:38:28 -04:00
kobewi
8793ec4564 Show tooltips even when paused or time_scale is 0 2021-07-23 17:49:30 +02:00
Michael Alexsander
a690cd9251 Make MenuButton's switch_on_hover work again 2021-07-22 14:27:30 -03:00
Rémi Verschelde
c82daaed48
Merge pull request #38317 from verdog/get-cam-2d-4.0
add viewport.get_camera_2d()
2021-07-20 22:19:06 +02:00
Joan Fons
a6adb58493 Editor StringName and Viewport optimizations
* Added explicit return type to the SNAME macro.
* Add some extra SNAME usages.
* Change some ClassDB methods to use const StringName & arguments.
* Cache the Window parent in Control because it's used in
  is_layout_rtl(), which is called often.
* Only enable internal processing for viewports that need it.
* Change CanvasItem::group to be a StringName because it's only used as
  that.
2021-07-20 20:35:41 +02:00
Rémi Verschelde
855c7c7414
Merge pull request #50566 from reduz/optimize-stringname-usage
Optimize StringName usage
2021-07-19 15:20:25 +02:00
Rémi Verschelde
95def293a6
Merge pull request #48186 from EricEzaM/PR/tooltip-improvements
Made default tooltips (non-custom ones) disappear on mouse enter.
2021-07-19 09:02:06 +02:00
reduz
6631f66c2a Optimize StringName usage
* Added a new macro SNAME() that constructs and caches a local stringname.
* Subsequent usages use the cached version.
* Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time.
* Replaced all theme usages by this new macro.
* Replace all signal emission usages by this new macro.
* Replace all call_deferred usages by this new macro.

This is part of ongoing work to optimize GUI and the editor.
2021-07-18 21:20:02 -03:00
Hugo Locurcio
523d6b2ae8
Merge pull request #47395 from sygi/shape_idx_collision
Add shape_idx to CollisionObject2D mouse_entered signal
2021-07-16 19:05:08 +02:00
Josh Chandler
879f84d8f8 add viewport.get_camera_2d()
* there is now a more clear distinction between camera_2d and camera_3d functions in the engine code
* simplified camera2d's exported interface - now everything happens directly with the 'current' variable and make_current and clear_current are no longer exposed- there were some situations where calling one instead of set_current would result in incomplete results
* rebased to current godot master
2021-07-03 15:08:17 -04:00
reduz
6c55d2aad2 Fix Render Info
* Fixed and redone the process to obtain render information from a viewport
* Some stats, such as material changes are too difficult to guess on Vulkan, were removed.
* Separated visible and shadow stats, which causes confusion.
* Texture, buffer and general video memory can be queried now.
* Fixed the performance metrics too.
2021-07-03 10:15:04 -03:00
sygi
6f3e7f7cb0 Add mouse_shape_entered and mouse_shape_exited signals to CollisionObject2D.
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2021-07-02 20:50:27 +01:00
reduz
d07f7c8d25 Fixes to 2D viewport
* Editor 2D viewport now uses embedded subwindows (windows no longer pop up)
* Restored the ability to disable 3D on the 2D viewport (makes 3D not display on 2D when there is a camera on the scene)
2021-06-29 17:40:45 -03:00
Rémi Verschelde
8fb7a9f023
Merge pull request #49719 from LightningAA/rename-node-is-ancestor-of
Rename `is_a_parent_of()` to `is_ancestor_of()`
2021-06-29 12:07:25 +02:00
kobewi
452e10ba7b Remove clips_input() method and use clip_content 2021-06-25 15:46:37 +02:00
Lightning_A
899e5f8685 Rename is_a_parent_of() to is_ancestor_of() 2021-06-21 08:39:28 -06:00
Aaron Franke
0ce49800ac
Use mouse and joypad enums instead of plain integers
Also MIDIMessage
2021-06-20 11:54:24 -04:00