Commit graph

1436 commits

Author SHA1 Message Date
Rémi Verschelde
a653801b17
Merge pull request #65285 from YuriSizov/window-theme-change-is-imminent
Un-defer the initial theme changed notification in `Window`
2022-09-03 18:23:45 +02:00
Yuri Sizov
41eabca0fb Un-defer the initial theme changed notification in Window 2022-09-03 14:55:13 +03:00
Xwdit
f350356183 Some improvements to the SceneTreeTimer 2022-09-03 11:44:11 +02:00
Rémi Verschelde
597bc949a4 Merge pull request #65250 from YuriSizov/theme-owner-rises 2022-09-02 23:20:49 +02:00
Yuri Sizov
8b128081e8 Un-defer the initial theme changed notification
Co-authored-by: Rindbee <idleman@yeah.net>
2022-09-02 23:44:23 +03:00
Yuri Sizov
ddc55ef746 Add ThemeOwner type for managing theme propagation and lookup 2022-09-02 23:44:23 +03:00
Hugo Locurcio
f7292dbeb3
Rename or_lesser range property hint to or_less
"less" should be used for quantity, rather than "lesser".

Existing scripts that use `or_lesser` in `_get_property_list()`
will need to be updated to account for this change.
2022-09-02 19:08:20 +02:00
Rémi Verschelde
6ccbc27093
Merge pull request #64735 from KoBeWi/viewportshifter 2022-09-02 15:42:42 +02:00
Rémi Verschelde
c82bbc38a5 Merge pull request #64952 from Chaosus/vs_rename_uniform_to_param 2022-09-02 13:49:53 +02:00
Rindbee
621b9a1bfe Fix getting an error message when repeatedly entering and exiting the tree 2022-09-02 10:48:20 +08:00
Fabio Alessandrelli
fbbd3950c8 Simplify network GDExtension bindings using EXBIND macros.
Simplify StreamPeer, PacketPeer, MultiplayerPeer extension.

Simplify and update WebRTC*Extension with newly supported types.
2022-09-01 19:10:22 +02:00
Yuri Sizov
15fd025f90 Add dumb and manual theme caching systems to Window 2022-09-01 16:05:02 +03:00
Yuri Rubinsky
8191b3c110 Rename uniform to parameter across the engine 2022-09-01 11:42:57 +03:00
Rémi Verschelde
e74809094f
Merge pull request #65108 from MinusKube/subwindow-focused-bug
Prevent subwindow_focused from pointing to a window that is not a subwindow
2022-09-01 08:45:37 +02:00
clayjohn
385ee5c70b Implement Physical Light Units as an optional setting.
This allows light sources to be specified in physical light units in addition to the regular energy multiplier. In order to avoid loss of precision at high values, brightness values are premultiplied by an exposure normalization value.

In support of Physical Light Units this PR also renames CameraEffects to CameraAttributes.
2022-08-31 12:14:46 -07:00
MinusKube
64cf943e07 Prevent subwindow_focused from pointing to a window that is not a subwindow 2022-08-30 21:57:03 +02:00
Rémi Verschelde
6e6287f748
Merge pull request #47744 from KoBeWi/press_F_to_play_exit 2022-08-30 19:29:04 +02:00
kobewi
cd01f695d5 Change _redraw_callback to callable_mp 2022-08-30 15:21:48 +02:00
Rémi Verschelde
02d510bd07
Merge pull request #63003 from Geometror/msaa-2d 2022-08-30 14:54:20 +02:00
Rémi Verschelde
ae349d8227
Merge pull request #64377 from Mickeon/rename-canvas-redraw
Rename `CanvasItem.update()` to `queue_redraw()`
2022-08-30 14:47:41 +02:00
kobewi
409613ba7b Allow to change the Stop shortcut used at runtime 2022-08-30 14:14:15 +02:00
Rémi Verschelde
0bf3f79157
Merge pull request #63902 from dalexeev/string-cases 2022-08-30 14:06:28 +02:00
Rémi Verschelde
889c522a19
Merge pull request #64410 from MewPurPur/rename-notification-instanced 2022-08-30 12:01:58 +02:00
Danil Alexeev
d4555ef5fb
Add String.to_{camel,pascal,snake}_case methods 2022-08-30 12:36:24 +03:00
Aaron Franke
10a56981dc
Rename String plus_file to path_join 2022-08-29 19:38:13 -05:00
Micky
e31bb5ffeb Rename CanvasItem.update() to queue_redraw()
Affects a lot of classes. Very thoroughly checked signal connections and deferred calls to this method, add_do_method/add_undo_method calls, and so on.

Also renames the internal `_update_callback()` to `_redraw_callback()` for consistency.

Just a few comments have also been changed to say "redraw".

In CPUParticles2D, there was a private variable with the same name. It has been renamed to `do_redraw`.
2022-08-29 14:59:47 +02:00
Rémi Verschelde
e60086f98b
Merge pull request #64119 from YuriSizov/theme-init-database 2022-08-29 14:02:21 +02:00
Rémi Verschelde
fd6453c45e Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED"
This reverts commit 4b817a565c.

Fixes #64988.
Fixes #64997.

This caused several regressions (#64988, #64997,
https://github.com/godotengine/godot/issues/64997#issuecomment-1229970605)
which point at a flaw in the current logic:

- `Control::NOTIFICATION_ENTER_TREE` triggers a *deferred* notification with
  `NOTIFCATION_THEME_CHANGED` as introduced in #62845.
- Some classes use their `THEME_CHANGED` to cache theme items in
  member variables (e.g. `style_normal`, etc.), and use those member
  variables in `ENTER_TREE`, `READY`, `DRAW`, etc. Since the `THEME_CHANGE`
  notification is now deferred, they end up accessing invalid state and this
  can lead to not applying theme properly (e.g. for EditorHelp) or crashing
  (e.g. for EditorLog or CodeEdit).

So we need to go back to the drawing board and see if `THEME_CHANGED` can be
called earlier so that the previous logic still works?

Or can we refactor all engine code to make sure that:
- `ENTER_TREE` and similar do not depend on theme properties cached in member
  variables.
- Or `THEME_CHANGE` does trigger a general UI update to make sure that any
  bad theme handling in `ENTER_TREE` and co. gets fixed when `THEME_CHANGE`
  does arrive for the first time. But that means having a temporary invalid
  (and possibly still crashing) state, and doing some computations twice
  which might be heavy (e.g. `EditorHelp::_update_doc()`).
2022-08-29 11:11:29 +02:00
Aaron Record
4b817a565c Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED 2022-08-27 11:52:29 -06:00
Rémi Verschelde
bd219de7fe
Merge pull request #64928 from YuriSizov/editor-tooltip-or-not-tooltip
Remove Inspector tooltip hack that never actually worked
2022-08-26 23:04:50 +02:00
Rémi Verschelde
4f60fd0480
Merge pull request #64777 from bruvzg/extend_to_title
[macOS] Extend editor contents to the window title bar for better space usage.
2022-08-26 23:03:31 +02:00
Yuri Sizov
6320a0fc18 Add ThemeDB, expose previously static Theme methods 2022-08-26 19:23:05 +03:00
Yuri Sizov
207bdc2b9f Remove Inspector tooltip hack that never actually worked 2022-08-26 17:22:13 +03:00
bruvzg
bc4ba6cb78
[macOS] Extend editor contents to the window titlebar for better space usage. 2022-08-26 15:12:43 +03:00
Rémi Verschelde
ff612b6916
Merge pull request #64574 from Begah/fix_transient_window_wrap_mouse 2022-08-26 13:54:23 +02:00
Rémi Verschelde
7013c68619
Merge pull request #64422 from bruvzg/make_fonts_unbearably_ugly_2.0 2022-08-26 11:59:07 +02:00
Rémi Verschelde
7bb92bc040
Merge pull request #62845 from AaronRecord/dont_update_theme_outside_of_tree
Refactor and remove excessive calls of `NOTIFICATION_THEME_CHANGED`
2022-08-26 10:37:44 +02:00
Rémi Verschelde
d93d646723
Merge pull request #64570 from KoBeWi/node🧳ing
Unify node casing adjustment
2022-08-26 09:49:58 +02:00
Aaron Record
74eb2a70bd Refactor and remove excessive calls of NOTIFICATION_THEME_CHANGED 2022-08-25 14:50:49 -06:00
Rémi Verschelde
060d0ce882
Merge pull request #53299 from Calinou/viewport-tweak-configuration-warning 2022-08-25 21:44:31 +02:00
Rémi Verschelde
5eed1b299b
Merge pull request #64355 from Mickeon/rename-follow-viewport 2022-08-25 18:34:19 +02:00
MathieuRoux
5ac5c8bc06 Fix warp_mouse for transient windows, smoother mouse positioning when releasing mouse for spinbox 2022-08-25 11:30:49 +02:00
Rémi Verschelde
bb6d771397
Merge pull request #64843 from Faless/mp/4.x_encode_fix
[MP] Fix variant serialization after variant size change.
2022-08-25 00:02:07 +02:00
Fabio Alessandrelli
75de626781 [MP] Fix variant serialization after variant size change.
The bit mask used for the type when compressing variants in the
Multiplayer API became too small to represent all variant types.

This commit expand the mask, which means we no longer have an extra bit
in the "meta" byte we use to store encoding information.

The extra bit was only used in case of booleans to store the value and
since booleans do not require extra encoding information we use those 2
bits to store the value instead.
2022-08-24 19:46:55 +02:00
Rémi Verschelde
629949d0a5
Merge pull request #64759 from skyace65/Anisotropic
Spell out "anisotropic" fully in filter options
2022-08-24 09:53:28 +02:00
Rémi Verschelde
91e5f48ea7
Merge pull request #64009 from KoBeWi/arrayy_lmao
Replace Array return types with TypedArray (part 2)
2022-08-24 08:18:56 +02:00
skyace65
64061678c6 Spell out "anisotropic" fully in filter options 2022-08-23 19:19:56 -04:00
kobewi
1abdffe7a0 Replace Array return types with TypedArray 2 2022-08-23 23:21:32 +02:00
Pedro J. Estébanez
910efbff03 Avoid warnings about cursor shape change not supported 2022-08-23 11:14:07 +02:00
bruvzg
bcc3643989
Add font LCD sub-pixel anti-aliasing support. 2022-08-23 08:47:21 +03:00