Add support for font weight and stretch selection when using system fonts.
Add function to get system fallback font from a font name, style, text, and language code.
Implement system font support for Android.
Use system fonts as a last resort fallback.
When using high physics FPS (which is a requirement to minimize input
lag and improve precision in simulation racing games), a higher value
prevents the game from slowing down at low rendering FPS.
This can be done via an Engine property for run-time changes,
or a project setting for initial changes.
This makes the setting easier to find, as research has found there are
numerous use cases to limiting FPS. This also improves documentation
related to the Engine property and project setting.
The project setting also works in projects exported in release mode,
so its location in the `debug/` section was misleading.
Exposed as read_string_from_stdin so it's clear it's not retrieving a
property.
The method is kept with the block parameter, but a note is added to the
docs specifying that is not implemented on any platform (should we just
remove it?).
These methods exist since the dawn of (open source) Godot and have hardly
been updated over time, so they barely work and I'm fairly sure nobody is
using them. (See #46505 for details.)
While some of the functionality they aimed to provide might be useful for
optimization work and introspection, this should likely be redesigned from
scratch with a cleaner and more modern interface (e.g. exposed via the
Performance singleton, or ResourceLoader, and a better API overall).
This method never did anything in Godot since 3.0, since its code
was commented out. The last time the method had an implementation
was in Godot 2.1.x.
This can be used to restart a project with specific command line arguments
applied. This can work in tandem with `OS.get_cmdline_args()` to restart
with the same command line arguments as used to originally run the project.
Example use cases:
- Restart to apply an user setting change that requires a restart to work.
- Restart with a Godot command line argument to change the video driver,
audio driver, etc.
Implements the standard Unix double dash (--) commandline argument:
* Arguments after a double dash (--) are ignored by Godot and stored for the user.
* User can access them via `OS.get_cmdline_user_args()`
Example:
`godot.exe scene_to_run.tscn --fullscreen -- --start-level 2`
This was removed in #63481, and we confirmed that it's better like this,
but we add back the possibility to strip CR as an option, to optionally
restore the previous behavior.
For performance this is done directly in `String::parse_utf8`.
Also fixes Android `FileAccess::get_line()` as this one _should_ strip CR.
Supersedes #63717.
This quits the project when an animation is done playing in the
given AnimationPlayer, but only in Movie Maker mode.
When this happens, a message is printed with the absolute path of the
AnimationPlayer node that caused the engine to quit.
This can be used to create videos that stop at a specified time
without having to write any script.
A report is now also printed to the console when the video is done
recording (as long as the engine was exited properly).
This report is unfortunately not always visible in the editor's
Output panel, as it's printed too late.
A method was also added to get the path to the output file from the
scripting API.
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
(order matters) but use is discouraged.
There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
Adds the is_process_running function to the native OS class and exposes it to script.
This is implemented on Windows and Unix platforms. A stub is provided for other platforms that do not support this function.
Documentation is updated to reflect new API function.
These typedefs don't save much typing compared to the full `Ref<Resource>`
and `Ref<RefCounted>`, yet they sometimes introduce confusion among
new contributors.
* Ability to create script languages from GDExtension
* Some additions to gdnative_extension.h to make this happen
* Moved the GDExtension binder to core
This now allows creating scripting languages from GDExtension, with the same ease as if it was a module. It replaces the old PluginScript from Godot 3.x.
Warning: GodotCPP will need to be updated to support this (it may be a bit of work as ScriptInstance needs to be created over there again).
We might want to re-add something like this if/when we find a good use case
for it and do the effort to categorize all objects in the API properly.
Until then, it's better to remove that boilerplate since it's not needed.
Closes#18711.
* Based on the work done for Variant in the past.
* Added `ClassDB::bind_static_method`
* Cleaned up ClassDB::bind_method to use variadic templates.
This adds support for having static methods in Object derived classes.
Note that this does not make it work yet in GDScript or Mono and, while it works for GDExtension, GodotCPP needs to be updated.
enh: Add FLAG_NONE to SaverFlags in ResourceSaver to fix api inconsistency
fix: flags parameter of ResourceSaver::save is now uint32_t to allow flag composition in scripts
This method can be used to get the CPU model name.
It can be used in conjunction with
`RenderingServer.get_video_adapter_name()` and
`RenderingServer.get_video_adapter_vendor()` for annotating benchmarks
and automatic graphics quality configuration.