Commit graph

322 commits

Author SHA1 Message Date
bruvzg 9bb03e60d9 Optimise is_layout_rtl by caching its return value. 2021-07-25 10:33:00 +03:00
Aaron Franke 4e6efd1b07
Use C++ iterators for Lists in many situations 2021-07-23 17:38:28 -04: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
Yuri Sizov 4ee0e6ddf5 Add type variations to Theme 2021-07-13 02:26:28 +03:00
Rémi Verschelde a525e77740
Merge pull request #49468 from menip/FixGetScreenPosition
Fix Control::get_screen_position() not considering viewport scale
2021-07-03 14:29:20 +02:00
reduz 75688772b3 Fix editor suffixes and degrees conversion
* Functions to convert to/from degrees are all gone. Conversion is done by the editor.
* Use PROPERTY_HINT_ANGLE instead of PROPERTY_HINT_RANGE to edit radian angles in degrees.
* Added possibility to add suffixes to range properties, use "min,max[,step][,suffix:<something>]" example "0,100,1,suffix:m"
* In general, can add suffixes for EditorSpinSlider
Not covered by this PR, will have to be addressed by future ones:

* Ability to switch radians/degrees in the inspector for angle properties (if actually wanted).
* Animations previously made will most likely break, need to add a way to make old ones compatible.
* Only added a "px" suffix to 2D position and a "m" one to 3D position, someone needs to go through the rest of the engine and add all remaining suffixes.
* Likely also need to track down usage of EditorSpinSlider outside properties to add suffixes to it too.
2021-06-30 12:38:25 -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
reduz b1d15c51bc Implement native extension system
* Deprecates GDNative in favor of a simpler, lower level interface.
* New extension system allows registering core engine classes.
* Simple header interface in gdnative_interace.h
2021-06-25 17:32:45 -03: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 8b692e8872
Add PROPERTY_USAGE_NONE and use it 2021-06-17 19:10:26 -04:00
kobewi 7ff135b015 Consistently prefix bound virtual methods with _ 2021-06-12 00:55:52 +02:00
menip ae324444ba Fix Control::get_screen_position() not considering viewport scale 2021-06-09 12:05:04 -07:00
Rémi Verschelde d7f1718742
Merge pull request #46482 from KoBeWi/size_warning_the_sequel
Warn about changing size only when it's relevant
2021-06-03 11:21:33 +02:00
Hugo Locurcio 87f503310b
Tweak dozens of editor property hints for consistency
- Update Viewport MSAA property hints to match the currently
  exposed values.
- Add some performance hints to property hints.
2021-05-25 02:50:35 +02:00
Yuri Sizov 9eaa139c1f Add theme_custom_type property to Control and Window 2021-05-17 17:20:42 +03:00
Andrii Doroshenko (Xrayez) c9a3d13bd9 Fix variable names for "usage" flags in Control::_get_property_list()
Renamed incorrect "hint" variable names to "usage" in
`_get_property_list()`, as "hint" implies one of the PROPERTY_HINT_*
values, which is not the case here.
2021-05-13 12:51:38 +03:00
Yuri Sizov 980cf73bbc Fix autocompletion for Control's Theme properties 2021-04-30 20:47:01 +03:00
Nathan Franke 2a8c59c171
Use Array for node configuration warnings
Previously, the warnings were passed as a string and delimitation of which were hard coded at each implementation.
2021-04-11 23:25:38 -05:00
Rémi Verschelde 5d0cc7c15f Merge pull request #47252 from KoBeWi/themecide
Add methods to remove theme overrides
2021-03-31 20:52:19 +02:00
Rémi Verschelde 995ce158dd
Merge pull request #46702 from HaSa1002/fix-min-size-resize
Fix removal of `rect_min_size` not triggering resize
2021-03-30 20:46:04 +02:00
Johannes c8868fcaab
Fix removal of rect_min_size not triggering resize
fixes #46672
2021-03-23 23:06:50 +01:00
kobewi 5950482b86 Remove the clearing behavior from add_override 2021-03-23 00:55:02 +01:00
kobewi ecff5bc42f Add methods to remove theme overrides 2021-03-23 00:51:16 +01:00
Aaron Franke 6811a45b59
Use real_t in non-physics 2D nodes 2021-03-19 13:04:45 -04:00
Kongfa Waroros b80406770f Check if _edit_set_position and _edit_set_rect was used outside an editor 2021-03-15 14:34:24 +07:00
Anshul7sp1 91181c2086 Fixes small typos and grammar correction 2021-03-12 19:05:16 +05:30
sps1112 05f5a43cad Fix Control._edit_set_state crash 2021-03-05 21:52:34 +05:30
Rémi Verschelde 372b1b8f68 Revert "Add size check in Control._edit_set_state to prevent crash"
This reverts commit ef1d58f034.
2021-03-04 12:06:58 +01:00
sps1112 ef1d58f034 Add size check in Control._edit_set_state to prevent crash 2021-03-04 10:55:42 +05:30
Rémi Verschelde ec7053259b
Merge pull request #41437 from KoBeWi/put_it_here
Allow to create a node at specific position
2021-03-01 15:48:53 +01:00
kobewi 5e4ab20296 Warn about changing size only when it's relevant 2021-02-27 19:24:59 +01:00
Tomasz Chabora 8df22a03c4 Allow to create a node at specific position 2021-02-26 14:40:28 +01:00
Tomasz Chabora 84da090a69 Warn when setting Control size inside ready() 2021-02-19 18:32:24 +01:00
reduz 64140eaf42 Reorganize Project Settings
-Advanced Settings toggle also hides advanced properties when disabled
-Simplified Advanced Bar (errors were just plain redundant)
-Reorganized rendering quality settings.
-Reorganized miscelaneous settings for clean up.
2021-02-18 11:23:34 -03:00
reduz 1aa2823fa3 Removed _change_notify
-For inspector refresh, the inspector now detects if a property change by polling a few times per second and then does update the control if so. This process is very cheap.
-For property list refresh, a new signal (property_list_changed) was added to Object. _change_notify() is replaced by notify_property_list_changed()
-Changed all objects using the old method to the signal, or just deleted the calls to _change_notify(<property>) since they are unnecesary now.
2021-02-10 19:31:24 -03:00
Rémi Verschelde eda5f4ea31
Merge pull request #44349 from KoBeWi/drop_the_data!
Allow to override drop data in LineEdit
2021-01-26 16:03:07 +01:00
Nils Reid 3e94c23fa5 Exposed find_next_valid_focus and find_prev_valid_focus. 2021-01-26 08:19:20 +01:00
Rémi Verschelde b5334d14f7
Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆
2021-01-01 20:19:21 +01:00
Rémi Verschelde 891b1cdf28
Merge pull request #44607 from madmiraal/rename-control-rotation
Rename Control rotation to rotation_degrees
2020-12-28 14:42:06 +01:00
Marcel Admiraal 5b937d493f Rename empty() to is_empty() 2020-12-28 10:39:56 +00:00
Marcel Admiraal b832003c6b Rename Control rotation to rotation_degrees 2020-12-23 07:06:30 +00:00
Marcel Admiraal 4b8b803931 Rename Control margin to offset 2020-12-23 06:25:56 +00:00
Rémi Verschelde 153c132a7e
Merge pull request #44300 from KoBeWi/🧹🧹
Move initialization of some classes to headers
2020-12-21 00:24:36 +01:00
Daniel Ting aea7fde241 Rename neighbour in Control to neighbor
This keeps things consistent with the rest of Godot, which uses the
American English spelling of Color.
2020-12-15 16:42:21 -06:00
kobewi a3a31591b5 Allow to override drop data in LineEdit 2020-12-13 20:16:56 +01:00
Tomasz Chabora 31cb04fbdd Move initialization of some classes to headers 2020-12-11 18:20:03 +01:00
Tomasz Chabora 2c048ea164 Cleanup unused engine code 2020-12-09 12:12:36 +01:00
Rémi Verschelde 1a001ad964
doc: Sync classref with current source
And fixups:
- Add missing bindings in RenderingServer
- Remove duplicate ArrayMesh enum bindings (they're in Mesh already)
- Remove redundant _unhandled_key_input binding in Control (it's in Node
  already)
2020-12-04 22:28:08 +01: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