Commit graph

878 commits

Author SHA1 Message Date
Yuri Roubinsky
4a3588a51a
Merge pull request #43828 from Chaosus/restore_line_antialiasing
Restored antialiased lines by emulation using triangle strips
2020-11-28 11:32:16 +03:00
Rémi Verschelde
a09846e015
Merge pull request #42109 from EricEzaM/PR/input-and-shortcuts-rework
Shortcuts rework - fixed issues with input propagation and triggering of unwanted shortcuts.
2020-11-28 09:04:25 +01:00
Rémi Verschelde
a6751e6c58
Merge pull request #41100 from bruvzg/ctl_text_server_interface
[Complex Text Layouts] Implement TextServer interface.
2020-11-28 09:03:15 +01:00
Yuri Roubinsky
3ec972fc95 Restored antialiased lines by emulation using triangle strips 2020-11-27 20:45:59 +03:00
reduz
1bcf3c305b Implement signed distance fields for 2D shaders 2020-11-26 10:49:50 -03:00
bruvzg
99666de00f
[Complex Text Layouts] Refactor Font class, default themes and controls to use Text Server interface.
Implement interface mirroring.
Add TextLine and TextParagraph classes.
Handle UTF-16 input on macOS and Windows.
2020-11-26 14:25:48 +02:00
Eric M
efe5c250d5 Implement new shortcuts system.
unhandled_key_input changed to unhandled_button_input. Controls can set a 'shortcut_context' which they can then use to determine if their shortcuts should be triggered or not, based on if the viewport's focused GUI control is a child of their 'shortcut context'.
2020-11-23 21:14:26 +10:00
Andrii Doroshenko (Xrayez)
afcb6f38db Do not start Timer upon manual switching of internal process
Prevents `Timer` to prematurely start and timeout immediately if internal
processing is enabled manually with `Timer.set_process_internal(true)` or
`Timer.set_physics_process_internal(true)`.

Even if the internal processing is enabled manually, the user still has to
actually start the timer with `start()` method explicitly.
2020-11-20 01:28:40 +02:00
Aaron Franke
02161aad5a
Remove empty lines around braces with the formatting script 2020-11-16 23:38:11 -05:00
Hugo Locurcio
5770e08c2a
Remove property groups for Pause Mode and Script
Each of those only grouped 1 property, making them useless.

This closes https://github.com/godotengine/godot-proposals/issues/1840.
2020-11-15 16:01:10 +01:00
reduz
221a2a1742 Refactored variant constructor logic 2020-11-09 08:54:43 -03:00
reduz
127458ed17 Reorganized core/ directory, it was too fatty already
-Removed FuncRef, since Callable makes it obsolete
-Removed int_types.h as its obsolete in c++11+
-Changed color names code
2020-11-07 20:17:12 -03:00
Rémi Verschelde
afef8e30ea
Merge pull request #39635 from Meriipu/master_nodrop
do not drop mouseover on WM_MOUSE_EXIT
2020-11-03 20:28:11 +01:00
Rémi Verschelde
c5d8dafec4
Tooltips: Improve code clarity and docs
The return type for `_make_custom_tooltip` is clarified as Control, and users
should make sure to return a visible node for proper size calculations.

Moreover in the current master branch, a PopupPanel will be added as parent
to the provided tooltip to make it a sub-window.

Clarifies documentation for `Control._make_custom_tooltip`, and shows how to
use the (until now undocumented) "TooltipPanel" and "TooltipLabel" theme types
to style tooltips.

Fixes #39677.
2020-11-03 09:19:03 +01:00
reduz
0e6664539d Refactor pixel snapping.
-Rename pixel_snap to snap_2d_to_vertices
-Added snap_2d_to_transforms which is more useful

Fixes #41814
Solves proposal https://github.com/godotengine/godot-proposals/issues/1666
Supersedes #35606, supersedes #41535, supersedes #41534
2020-10-30 08:57:32 -03:00
reduz
8ab9b39707 Implement CanvasGroup and CanvasItem clipping
-Allows merging several 2D objects into a single draw operation
-Use current node to clip children nodes
-Further fixes to Vulkan barriers
-Changed font texture generation to white, fixes dark eges when blurred
-Other small misc fixes to backbuffer code.
2020-10-28 18:53:32 -03:00
Gilles Roudière
131a7b58c8 Fixes setting top_level not updating the global position 2020-10-27 13:44:35 +01:00
Hugo Locurcio
4dd5a17636
Fix uninitialized Viewport::use_debanding member variable 2020-10-26 21:37:33 +01:00
Rémi Verschelde
2de498d438
Merge pull request #42969 from Klowner/fixes/42967-popup-position
include parent display location in popup location calculation
2020-10-26 09:26:00 +01:00
reduz
84d734da0e Refactored 2D shader and lighting system
-Removed normal/specular properties from nodes
-Create CanvasTexture, which can contain normal/specular channels
-Refactored, optimized and simplified 2D shaders
-Use atlas for light textures.
-Use a shadow atlas for shadow textures.
-Use both items aboves to make light rendering stateless (faster).
-Reorganized uniform sets for more efficiency.
2020-10-24 15:57:25 -03:00
Mark Riedesel
5a507df255 include parent display location in popup location calculation 2020-10-21 12:58:39 -04:00
Juan Linietsky
85ebf40b6c
Merge pull request #38097 from Calinou/add-viewport-debanding
Add a debanding property to Viewport
2020-10-19 14:15:44 -03:00
reduz
ee06a70ea6 Refactor MethodBind to use variadic templates
Removed make_binders and the old style generated binders.
2020-10-18 12:28:44 +02:00
PouleyKetchoupp
4686200f0e Fix Popup crash in single window mode
focus_target->exclusive_child could be invalidated during the call to
focus_target->grab_focus(), now using the same logic with safe accesses
to focus_target.
2020-10-09 11:20:38 +02:00
Duroxxigar
4834e14493 Updated getters and setters names for toplevel 2020-10-02 19:09:01 -04:00
Rémi Verschelde
19f72beebb
Merge pull request #42451 from Duroxxigar/rename-toplevel
Renamed toplevel to be top_level
2020-10-02 10:57:23 +02:00
Rémi Verschelde
12091b39d2
Merge pull request #38743 from arrowinaknee/node-config-warnings
Update all get_configuration_warning() to retrieve warnings from the parent
2020-10-01 14:03:29 +02:00
Duroxxigar
b687ace7f9 Renamed toplevel to be top_level 2020-10-01 03:17:33 -04:00
Duroxxigar
85a8dbb7b6 Made toplevel a property for Node3D and CanvasItem 2020-10-01 02:43:30 -04:00
Rémi Verschelde
c217498aa6
Merge pull request #41895 from 11thPenguin/master
Fix minor typo, gui_hid -> gui_hide
2020-09-29 10:35:12 +02:00
Meriipu
e8804b9978 Make the currently hovered control get updated on mouse-release
Previously, when the mouse was released after dragging a scrollbar,
its highlight was not dropped (if the mouse cursor was still inside
the viewport). This seems to be because the currently hovered control
only gets updated when the mouse is moved.

This commit fixes the dropping of the cosmetic highlight by running
the check for whether the currently hovered control has changed on
mouse-clicks, in addition to to the existing mouse-movements.
2020-09-28 16:04:01 +02:00
Rémi Verschelde
7f24914b9e
Merge pull request #36374 from kuruk-mm/tilemap_filter_set_and_update
TileMap: Set texture_filter and texture_repeat to generated CanvasItems...
2020-09-15 17:15:09 +02:00
Rémi Verschelde
6f0fa8519f
Merge pull request #41776 from EricEzaM/PR/tooltip-bugfixes
Tooltip flickering and targeting fixes.
2020-09-15 10:24:17 +02:00
Eric M
07cb95bbda Tooltip flickering and targeting fixes. 2020-09-15 17:34:29 +10:00
Mateo Dev .59
bb7db2138b TileMap: Set texture_filter and texture_repeat to generated CanvasItems and update when it changes 2020-09-12 11:49:38 -03:00
Rémi Verschelde
a2a78a8066
doc: Sync classref with current source
Bind missing enums.
2020-09-11 12:22:10 +02:00
Yetizone
d12ddf6567 scene_tree.h: Update header guard 2020-09-10 17:20:50 +03:00
Jonah Stich
f6b14238c7 Fixed minor typo, gui_hid -> gui_hide. 2020-09-08 18:08:21 -07:00
Fabio Alessandrelli
2cb6b2ac6f
Merge pull request #38944 from Wavesonics/http-gzip
HttpRequest now handles gzipping response bodies
2020-09-07 17:03:19 +02:00
Meriipu
44657db3e2 If the mouse is held on notification_wm_mouse_exit, do not drop focus
This fixes a bug where users of the scrollbar had to be very careful
not to move the mouse outside the viewport, otherwise the scrollbar
would drop its drag-action and stop scrolling until clicked again.

The existing behaviour had the side-effect of also dropping the
cosmetic highlighting of the scrollbar (in addition to the dragging),
for the specific case where the mouse was move outside the window.
The previous behaviour did nothing to remove the highlight if the
mouse was released (but not moved) inside the viewport.

This separate issue with the lingering highlight of the scrollbar
(until a mouse-movement action is performed inside the viewport) is
fixed in an immediate followup to this commit.

Closes bug #39634
2020-09-07 04:11:27 +02:00
bruvzg
80b8eff6aa
[Complex Test Layouts] Change String to use UTF-32 encoding on all platforms. 2020-09-03 19:56:24 +03:00
Rémi Verschelde
2a8531cc56
Merge pull request #41456 from nekomatata/x11-fix-popups
Popup fixes for X11 display server
2020-09-03 00:09:19 +02:00
Adam Brown
6584db1538 HTTPRequest now accepts gzip
Added request_raw to HttpRequest
Added decompress_dynamic to Compression class
Added decompress_dynamic to BytePoolArray

Merge doc fix

revert
2020-09-02 12:59:59 -07:00
SekoiaTree
bdf614d3d7 Made get_child support negative indexes, with documentation 2020-09-01 11:34:36 +02:00
PouleyKetchoupp
bb306750ce Fix WINDOW_EVENT_FOCUS_IN for popups on Windows
On Windows, WINDOW_EVENT_FOCUS_IN was never sent by the display server
for popups, because WM_ACTIVATE events are received during the call to
_update_window_style, which happened before the callbacks were set.

This was causing some issues with the way Popup is now handling closing on
parent focus.

Now _update_window_style is only called during show_window, after Window
initialized callbacks.
2020-08-26 18:14:36 +02:00
PouleyKetchoupp
2b49cb0b73 Re-apply "Fixes for windows in X11 tiling WMs"
From PR #38727 which was reverted in #41373 because of regressions in Ubuntu
with Gnome.

Co-authored-by: Lorenzo Cerqua <lorenzocerqua@tutanota.com>
2020-08-22 18:42:42 +02:00
Juan Linietsky
9c5c1635b2
Revert "Fixes for windows in X11 tiling WMs" 2020-08-19 12:37:59 -03:00
Hugo Locurcio
8891579068
Add a debanding property to Viewport
It can be enabled in the Project Settings
(`rendering/quality/screen_filters/use_debanding`). It's disabled
by default as it has a small performance impact and can make
PNG screenshots much larger (due to how dithering works).
It will also slightly brighten the scene's dark areas.

As a result, it should be enabled only when banding is noticeable enough.

This closes #17006.
2020-08-14 23:12:33 +02:00
Tomasz Chabora
677796a2c3 Expose NOTIFICATION_POST_ENTER_TREE 2020-08-12 13:31:32 +02:00
George Marques
b8671b61fc
Fix _input being mistakenly called twice on script
Instead it calls both the script and the native method.
2020-08-03 08:40:08 -03:00