Commit Graph

220 Commits

Author SHA1 Message Date
989dedddf9 Merge pull request #77577 from YeldhamDev/improve_window_docs
Improve `Window` documentation
2023-05-29 17:34:24 +02:00
f7fced5e00 Improve Window documentation 2023-05-29 11:18:31 -03:00
04562662d3 Overhaul the top sections of the class reference (Core classes) 2023-05-19 07:04:48 +02:00
7925670f81 Add frame delta smoothing option (4.x)
Frame deltas are currently measured by querying the OS timer each frame. This is subject to random error. Frame delta smoothing instead filters the delta read from the OS by replacing it with the refresh rate delta wherever possible.

This PR also contains code to estimate the refresh rate based on the input deltas, without reading the refresh rate from the host OS.

The delta_smooth_enabled setting can also be modified at runtime through OS::, and there is also now a command line setting to override the project setting.
2023-05-16 13:57:25 +01:00
4b51569164 Merge pull request #76822 from YeldhamDev/os_docs
Improve some descriptions in the OS docs
2023-05-08 12:21:08 +02:00
6db12c5e50 Improve some descriptions in the OS docs 2023-05-07 23:28:56 -03:00
5056c427d3 Improve RenderingServer, RenderingDevice, ShaderGlobalsOverride documentation
This brings the overall class reference completion percentage from 87% to 92%.
2023-05-06 22:40:32 +02:00
8106d33d0f Fixed various typos across the docs 2023-05-02 18:24:32 -04:00
76d33d187f Merge pull request #69698 from Daylily-Zeleen/daylily-zeleen/show_in_explorer
Implement and expose OS::shell_show_in_file_manager()
2023-04-25 09:57:27 +02:00
b12ced0a26 Implement and expose OS::shell_show_in_file_manager() 2023-04-25 11:29:32 +08:00
628f3b2f79 [OS] Implement and expose to scripting APIs get_memory_info method instead of old get_free_static_memory. 2023-04-24 14:08:55 +03:00
a5009f4d3c [Web] Detect host OS and use macOS keys on mac hosts. 2023-04-11 10:58:54 +03:00
a65d99b541 Remove reference to clipboard in OS class doc 2023-04-02 19:45:55 -04:00
81ac3c3e71 Document using String.uri_encode() with OS.shell_open() 2023-03-03 11:07:34 +01:00
1c1524a651 Bump version to 4.1-dev
Can't stop, won't stop, they said, huh?
2023-03-01 01:44:37 +01:00
e52213e2fa More codespell fixes, do more changes from previous ignore list 2023-02-01 12:11:36 +01:00
34a35ac6ca Update name of template feature tag in the class reference 2023-01-28 20:04:43 +01:00
5b1df48c6c Convert en_GB spelling to en_US with codespell 2023-01-23 11:02:20 +01:00
818a9e99a4 OS: Add unset_environment, better validate input
Instead of returning an undocumented boolean error code, we do the
validation checks that should ensure a successful result.

Based on:
- https://linux.die.net/man/3/setenv
- https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setenvironmentvariable
2023-01-16 16:39:44 +01:00
0e4e782ada Merge pull request #70714 from Calinou/doc-os-stdin
Improve documentation for `OS.read_string_from_stdin()`
2023-01-12 09:24:47 +01:00
86b8176864 Improve documentation for OS.read_string_from_stdin()
This makes it clearer that calls to this method are blocking.

The unused method parameter was also removed.
2023-01-11 19:57:25 +01:00
8d7d1b0bb2 Remove duplicate Month and Weekday enums
Well, they were duplicately-exposed, but triplicately-defined.
2022-12-26 15:16:25 -06:00
ecec415988 Use system fonts as fallback and improve system font handling.
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.
2022-12-04 18:44:20 +02:00
5eeb6e5906 Merge pull request #68532 from Calinou/cmdline-user-args-add-alternative-separator
Allow `++` as an alternative separator to `--` for user CLI arguments
2022-11-28 08:40:14 +01:00
b6b6c5107a fix "unknown document" classref links 2022-11-14 21:36:28 +01:00
914d3e1b1d Allow ++ as an alternative separator to -- for user CLI arguments
This is required when using `startx` to start a Godot project, as
`--` is used by `startx` for its own arguments (and there is no way
to escape it).
2022-11-11 23:23:58 +01:00
f7c611ab71 Style: Misc docs and comment style and language fixes
- Removed empty paragraphs in XML.
- Consistently use bold style for "Example:", on a new line.
- Fix usage of `[code]` when hyperlinks could be used (`[member]`, `[constant]`).
- Fix invalid usage of backticks for inline code in BBCode.
- Fix some American/British English spelling inconsistencies.
- Other minor fixes spotted along the way, including typo fixes with codespell.
- Don't specify `@GlobalScope` for `enum` and `constant`.
2022-11-02 19:01:18 +01:00
f3e2f78b21 Merge pull request #67923 from Calinou/doc-displayserver
Document the DisplayServer class
2022-10-30 00:08:50 +02:00
e7091d07cd Fix OS.get_video_adapter_driver_info crash 2022-10-27 15:45:21 -07:00
0fce78355d Document the DisplayServer class
This also adds a link to the Command line tutorial on pages
that reference command line arguments, as the page covers some
general usage tips for CLI arguments (especially on macOS).
2022-10-27 18:24:55 +02:00
736a2df437 Merge pull request #67244 from RandomShaper/split_render_further_2
Polish rendering driver refactor further (take 2)
2022-10-11 21:08:42 +02:00
f82deaa5b3 Polish rendering driver refactor further (take 2) 2022-10-11 19:06:55 +02:00
5aadc618b6 Merge pull request #66102 from MJacred/feature/getvideoadapterdriverinfo
Fetch video adapter driver name and version from OS
2022-10-11 13:59:53 +02:00
de768afbdc Fetch video adapter driver name and version from OS on Linux/*BSD and Windows 2022-10-11 12:39:41 +02:00
5458b14c43 Remove reference in OS to date and time functions
Since they moved to Time
2022-10-04 08:31:28 -07:00
d598fff7c2 Merge pull request #66803 from akien-mga/core-remove-NO_THREADS
Remove `NO_THREADS` fallback code, Godot 4 requires thread support
2022-10-03 14:51:02 +02:00
04a28763c0 Merge pull request #65751 from Faless/os/4.x_expose_read_from_stdin 2022-10-03 14:08:00 +02:00
54418ea659 Remove NO_THREADS fallback code, Godot 4 requires thread support
This also removes `OS::can_use_threads` from the public API since it's always
true.
2022-10-03 11:23:26 +02:00
43fe12e94e Fix missing "s" at the end of word in OS.move_to_trash() description
Change "Do not use it for files in res:// as it will not work in
exported project." to "[...] projects."
2022-09-29 20:59:49 +02:00
2316c3a3a9 Add new C# code blocks to class ref pages
- AStarGrid2D
- Engine
- Font
- Node
- OS
- Tweens
2022-09-19 19:38:29 +02:00
9f2dc68279 Replace File/Directory with FileAccess/DirAccess 2022-09-19 11:03:31 +02:00
ac9786c525 Add get_distribution_name() and get_version() to OS
supports: LinuxBSD, Windows, macOS, iOS, Android, UWP

Co-authored-by: bruvzg
2022-09-16 11:17:36 +02:00
8b5bb7eeea [OS] Expose get_stdin_string to Scripting.
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?).
2022-09-13 18:37:11 +02:00
c7e4c802ff Merge pull request #65031 from akien-mga/os-drop-obsolete-resource-debugging 2022-08-29 15:04:17 +02:00
eb56d1d1eb Drop obsolete resource usage debug methods from OS class
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).
2022-08-29 12:57:37 +02:00
d20b32186f [Web] Rename JavaScript platform to Web.
Also rename export name from "HTML5" to "Web".
2022-08-29 11:52:00 +02:00
465c423abb Remove unimplemented OS.dump_memory_to_file() method
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.
2022-08-18 18:51:25 +02:00
ef942718a0 [doc] Use "param" instead of "code" to refer to parameters (5) 2022-08-15 15:49:48 +03:00
c5d7115038 Rename the argument tag to param in XML documentation 2022-08-08 22:34:31 +03:00
1b713175b2 Expose the "restart on exit" OS functionality
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.
2022-08-01 14:06:13 +02:00