Commit graph

277 commits

Author SHA1 Message Date
jmb462
dcd2a92af3 Port existing _notification code to use switch statements (part 1/3) 2022-02-16 11:38:24 +01:00
Hendrik Brucker
b396fd4eef Improve compilation speed (forward declarations/includes cleanup) 2022-02-12 02:46:22 +01:00
Rémi Verschelde
fc076ece3d
Revert "Add missing SNAME macro optimization to all theme methods call"
This reverts commit a988fad9a0.

As discussed in #57725 and clarified in #57788, `SNAME` is not meant to be used
everywhere but only in critical code paths. For theme methods specifically, it
was by design that only getters use `SNAME` and not setters.
2022-02-08 10:17:25 +01:00
jmb462
a988fad9a0 Add missing SNAME macro optimization to all theme methods call 2022-02-06 23:06:11 +01:00
Rémi Verschelde
f8f19b313d
Merge pull request #57562 from AnilBK/string-add-contains
String: Add contains().
2022-02-03 22:21:24 +01:00
Anilforextra
adbe948bda String: Add contains(). 2022-02-04 01:28:02 +05:45
Rémi Verschelde
ebe9495b7d
EditorProperty: Fix range hint parsing with optional step
This could lead to have a step of 0 when parsing e.g. "1,10,is_greater".
2022-02-03 12:57:59 +01:00
Hendrik Brucker
2f1e7c28a4 Minor fixes/refactoring of project and editor setting dialogs 2022-02-01 00:19:01 +01:00
jmb462
b619a47416 Renaming layers from the inspector via a popup menu. 2022-01-28 23:52:11 +01:00
Rémi Verschelde
e6caaf4c80
Merge pull request #57205 from TechnoPorg/variant-template-cast
Allow method binds to take Object subclasses as arguments
2022-01-27 23:46:37 +01:00
TechnoPorg
051ef479c9 Allow method binds to take Object subclasses as arguments
This commit adds a condition to VariantCaster that casts Variants of type OBJECT to any type T, if T is derived from Object.
This change enables a fair bit of code cleanup. First, the Variant implicit cast operators for Node and Control can be removed, which allows for some invalid includes to be removed. Second, helper methods in Tree whose sole purpose was to cast arguments to TreeItem * are no longer necessary.
A few small changes also had to be made to other files, due to the changes cascading down all the includes.
2022-01-25 09:03:36 -07:00
bruvzg
40c56ed410
Improve locale detection.
Use separate language, script and country lists.
Add locale selection dialog and property hint.
2022-01-18 14:30:00 +02:00
Fabio Alessandrelli
98b147b319 [Editor] Fix inspector keying signals argument count.
The second parameter of the signals `EditorInspector.property_keyed` and
`EditorProperty.property_keyed_with_value` can be NIL, causing the event
to fire with less arguments when using `emit_signal` that accepts
Variant arguments, so we use the pointer version instead.
2022-01-07 15:48:37 +01:00
Rémi Verschelde
fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
Rémi Verschelde
c972948c21
Merge pull request #55761 from KoBeWi/alt_hack 2021-12-21 11:35:14 +01:00
kobewi
acf563e59f Add drag and drop for NodePaths 2021-12-09 18:50:57 +01:00
Nathan Franke
49403cbfa0
Replace String comparisons with "", String() to is_empty()
Also:
- Adds two stress tests to test_string.h
- Changes to .empty() on std::strings
2021-12-09 04:48:38 -06:00
Rémi Verschelde
4129c1d140
Merge pull request #55299 from nathanfranke/renames 2021-12-09 10:22:24 +01:00
Nathan Franke
41a20171eb
align to horizontal_alignment, valign to vertical_alignment, related 2021-12-09 01:38:46 -06:00
kobewi
3f4728fe54 Fix some containers disabling wrong scrollbars 2021-12-09 00:25:17 +01:00
kobewi
841a9ef820 ScrollContainer's scrollbar visibility is now enum 2021-12-07 18:27:12 +01:00
Rémi Verschelde
75ac048e4b
Merge pull request #55662 from KoBeWi/update_minimum_size_changed_to_update_minimum_size 2021-12-06 18:28:46 +01:00
jmb462
81efebb3a1
Fix bad popups offset in editor with single window off
Co-authored-by: Gil Arasa Verge <gilarasaverge@gmail.com>
Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com>
2021-12-06 14:29:48 +01:00
kobewi
ea7cc1dea9 Rename minimum_size_changed() method 2021-12-06 14:02:34 +01:00
Aaron Franke
3c0fdcc8ac
Use "enum class" for input enums 2021-11-12 15:37:54 -06:00
Yuri Sizov
2e4d18c929 Fix EditorInspectorPlugin virtual bindings and add parse_group callback 2021-11-10 17:56:59 +03:00
Rémi Verschelde
bbee193957
Merge pull request #52781 from KoBeWi/node's_favorite_shader 2021-11-03 16:33:50 +01:00
kobewi
07065d67e1 Infer shader type based on edited node 2021-11-03 15:27:38 +01:00
Yuri Sizov
67cbca341a Add a flag to EditorResourcePicker to differentiate selection contexts 2021-11-02 14:35:15 +03:00
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
bruvzg
ebbc25e89c Ignore empty Font resources as theme override.
Add range hint to font_size properties.
Remove excessive `base_size` Font property.
2021-10-25 14:05:37 +03:00
Hendrik Brucker
8dd8630c25 Fix property not shown in inspector when type is PACKED_COLOR_ARRAY 2021-10-01 02:52:44 +02:00
Rémi Verschelde
88b347dc27
Merge pull request #51920 from jmb462/missing-sname-macro-optimization-in-some-functions 2021-09-23 13:14:20 +02:00
Anilforextra
c63d51408f Use Rect2's get_end(). 2021-09-22 14:09:45 +05:45
Rémi Verschelde
a3d1bc757d
Merge pull request #32068 from aaronfranke/transform-editor
Reformat Transform(2D) matrix display in the inspector
2021-09-15 13:06:25 +02:00
Silc 'Tokage' Renew
facf8f1883 Apply set_read_only() to child classes of EditorProperty elements 2021-09-05 18:22:17 +09:00
Aaron Franke
288f0b6555
Reformat Transform(2D) inspector menus
Move, rename, recolor, and fix the inspector for these in the inspector. Coloring is now done by a helper method in "editor_inspector.cpp".
2021-08-31 11:24:40 -05:00
Juan Linietsky
503244d452
Merge pull request #52245 from AndreaCatania/AndreaCatania-patch-4
EditorPropertyText, pass changing variable false.
2021-08-30 08:51:11 -03:00
Andrea Catania
847d9c29c7
Update editor_properties.cpp 2021-08-30 11:35:17 +02:00
Andrea Catania
d332a546c6
EditorPropertyText, pass changing variable false.
When the `EditorPropertyText`  change is triggered, it pass the `changing` as true, while there is an early return that blocks such event to be emitted when the Editor is updating.
This commit aligns the early return with the passes parameter.
2021-08-30 11:34:01 +02:00
Juan Linietsky
07707a3627
Revert "Display a matrix for Node2D and don't display a duplicate origin" 2021-08-29 17:01:07 -03:00
Aaron Franke
ee7bb9bbb9
Display a matrix for Node2D and don't display a duplicate origin 2021-08-29 10:34:50 -05: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
jmb462
54de7114c5 Add missing SNAME macro optimization for StringName in some functions 2021-08-20 14:50:24 +02:00
Rémi Verschelde
c89ad92c96
Merge pull request #51532 from nekomatata/layer-mask-accessors
Uniformize layer names, script methods and documentation
2021-08-12 17:55:11 +02:00
PouleyKetchoupp
989acbbe81 Uniformize layer names, script methods and documentation
- Back to 1-based layer names to make it clearer in editor UI
- Layer bit accessors are renamed to layer value and 1-based too
- Uniform errors and documentation in render and physics
- Fix a few remaining collision_layer used in place of collision_mask
2021-08-12 08:06:42 -07:00
Paulb23
7e70f9e0b9 Expose and cleanup TextEdit line wrap API 2021-08-12 09:29:16 +01:00
Yuri Roubinsky
5e5cd2495d Added editor dialog for easily creating shaders. 2021-08-07 21:02:13 +03:00
PouleyKetchoupp
7a0c210f9b Refactor layer property editor grid
- Now able to display up to 32 layers in physics (still 20 for render)
- Adjustable grid size to fit available space in dock
- Expansion icon to display more layers vertically
- Layer numbers in cells to help with selection
2021-07-30 11:19:50 -07: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