Commit graph

78 commits

Author SHA1 Message Date
Rindbee
621b9a1bfe Fix getting an error message when repeatedly entering and exiting the tree 2022-09-02 10:48:20 +08:00
kobewi
cd01f695d5 Change _redraw_callback to callable_mp 2022-08-30 15:21:48 +02: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
7013c68619
Merge pull request #64422 from bruvzg/make_fonts_unbearably_ugly_2.0 2022-08-26 11:59:07 +02:00
skyace65
64061678c6 Spell out "anisotropic" fully in filter options 2022-08-23 19:19:56 -04:00
bruvzg
bcc3643989
Add font LCD sub-pixel anti-aliasing support. 2022-08-23 08:47:21 +03:00
Rindbee
fc17d3563d Remove first_draw and reset visibility when entering tree 2022-07-28 12:35:47 +08:00
kleonc
57ff4032d0 Fix CanvasItem not exiting its canvas group on canvas exit 2022-07-20 21:35:31 +02:00
bruvzg
cbe3a2dcb7
Use BitField hint for the TextServer enums. Add missing parts for BitField support to the GDextension API. 2022-07-15 08:49:50 +03:00
bruvzg
344ba0ffaf
Refactor Font configuration and import UI, and Font resources. 2022-07-06 14:12:36 +03:00
markdibarry
459228cdb3 Add explicit deferred flags 2022-06-19 10:04:53 -04:00
FireForge
3073b85de9 Rename theme properties to include underscores
- check_vadjust -> check_v_adjust
- close_h_ofs -> close_h_offset
- close_v_ofs -> close_v_offset
- commentfocus -> comment_focus
- hseparation -> h_separation
- ofs -> offset
- selectedframe -> selected_frame
- state_machine_selectedframe -> state_machine_selected_frame
- table_hseparation -> table_h_separation
- table_vseparation -> table_v_separation
- vseparation -> v_separation
2022-04-23 11:16:18 -05:00
Yuri Roubinsky
6e9535a9c8 Restore antialiasing for draw_line 2022-04-12 13:03:56 +03:00
Vitika9
ff75b30e6e Removed show_on_top property in CanvasItem 2022-04-01 18:40:40 +05:30
Jason Knight
640099cce5 Bind NOTIFICATION_LOCAL_TRANFORM_CHANGED 2022-03-20 11:34:01 -06:00
Rémi Verschelde
19950076b1
Merge pull request #58394 from bruvzg/rtl_hint 2022-03-18 14:49:13 +01:00
Markus Sauermann
7451fa63f2 Simplify always true conditional
get_viewport() is always true, because is_inside_tree() is true.
2022-03-16 16:28:11 +01:00
kobewi
bcf13dc175 Expose methods for screen-space transforms 2022-03-13 16:05:08 +01:00
Markus Sauermann
dce6cb7393 Fix invisible CanvasItem visibility issue 2022-02-22 10:13:02 +01:00
bruvzg
7385c3602d
Add RichTextLabel "hint" tag. 2022-02-21 19:34:16 +02:00
kobewi
3a77484f70 Fix CanvasItem visibility propagation 2022-02-19 22:40:53 +01:00
Rémi Verschelde
0f5455230c
Use switch consistently in _notification (scene folder) 2022-02-15 18:44:55 +01:00
kobewi
ab5b5e1577 Rework CanvasItem visibility propagation 2022-02-06 00:26:28 +01:00
kobewi
189dab2d76 Add visibility to CanvasLayer 2022-02-05 14:02:21 +01:00
lawnjelly
b411a731fe Add nodiscard to core math classes to catch c++ errors.
A common source of errors is to call functions (such as round()) expecting them to work in place, but them actually being designed only to return the processed value. Not using the return value in this case in indicative of a bug, and can be flagged as a warning by using the [[nodiscard]] attribute.
2022-01-20 13:07:49 +00:00
Stijn Hinlopen
fb1cd9e446 Refactor CanvasItem show/hide/set_visible 2022-01-12 23:13:41 +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
Nathan Franke
41a20171eb
align to horizontal_alignment, valign to vertical_alignment, related 2021-12-09 01:38:46 -06:00
Haoyu Qiu
f18de71b56 Fix crash when update() is called inside _draw() 2021-12-06 14:20:26 +08:00
Rémi Verschelde
b99792b5d9
Merge pull request #54167 from brunosxs/fix-game-crash-when-sending-a-notification-from-a-camera-class 2021-11-16 14:11:14 +01: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
BrunoSXS
eb2deabffe Fixes a game crash caused by instantiating Camera2D and sending a notification from it before adding it to the tree. 2021-10-23 17:30:18 -03:00
bruvzg
0c0b5c84b0 Implement TextServer GDExtension interface, remove TextServer GDNative interface. 2021-10-01 15:13:29 +03:00
bruvzg
4c3f7d1290 Makes FontData importable resource.
Adds multi-channel SDF font texture generation and rendering support.
Adds per-font oversampling support.
Adds FontData import plugins (for dynamic fonts, BMFonts and monospaced image fonts), font texture cache pre-generation and loading.
Adds BMFont binary format and outline support.
2021-08-27 15:43:18 +03:00
reduz
3682978aee Replace BIND_VMETHOD by new GDVIRTUAL syntax
* New syntax is type safe.
* New syntax allows for type safe virtuals in native extensions.
* New syntax permits extremely fast calling.

Note: Everything was replaced where possible except for `_gui_input` `_input` and `_unhandled_input`.
These will require API rework on a separate PR as they work different than the rest of the functions.

Added a new method flag METHOD_FLAG_OBJECT_CORE, used internally. Allows to not dump the core virtuals like `_notification` to the json API, since each language will implement those as it is best fits.
2021-08-22 08:23:58 -03:00
Aaron Franke
eb4902a455
Fix some unnecessary includes 2021-08-13 00:27:38 -05:00
Aaron Franke
4e6efd1b07
Use C++ iterators for Lists in many situations 2021-07-23 17:38:28 -04:00
Rémi Verschelde
693f9b4e20
Merge pull request #50655 from JFonS/sname_opt
Editor StringName and Viewport optimizations
2021-07-20 21:49:32 +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
Hugo Locurcio
abc38b8d66
Use C++11 raw literals for shader code to improve readability
In files that have lots of branching, `\t` was replaced with a
tab character instead.
2021-07-19 08:19:50 +02:00
Hugo Locurcio
8f7e1b53ff
Allow using ORMMaterial3D by using BaseMaterial3D as a resource hint
Previously, only StandardMaterial3D could be defined as an alternative
to ShaderMaterial.

This also reorders the CanvasItemMaterial property hints to follow
alphabetical order (which is enforced by the inspector).
2021-07-04 17:49:36 +02:00
Aaron Franke
2508fd0533
Use PROPERTY_USAGE_NONE instead of 0 for no property usage
Also use const more often.
2021-07-01 14:13:27 -04:00
Aaron Franke
8b692e8872
Add PROPERTY_USAGE_NONE and use it 2021-06-17 19:10:26 -04:00
reduz
94d31ac327 Implement animation slice drawing in CanvasItem
* Added a function to ignore subsequent commands if they don't fall within the slice.
* This will be used by the new TileMap to properly provide animated tiles.
2021-06-17 12:42:27 -03: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
Rémi Verschelde
4219a4cb6f
Fix typos with codespell
Using codespell 2.0.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
fave
findn
GIRD
leapyear
lod
merchantibility
nd
numer
ois
ony
que
seeked
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2021-05-20 12:38:56 +02:00
Hugo Locurcio
cf1e30a2ed
Tweak CanvasItem/material sampling property hints for readability
The "Anisotropic" term is abbreviated as spelling it out would cause
the PopupMenu to overflow the editor window when using the default
inspector width.
2021-05-06 03:05:37 +02:00
Marcel Admiraal
fd30c36985 Rename Texture.get_data() to get_image() 2021-03-28 13:00:46 +01:00
Aaron Franke
6811a45b59
Use real_t in non-physics 2D nodes 2021-03-19 13:04:45 -04: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