summaryrefslogtreecommitdiffstats
path: root/doc/classes/DisplayServer.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/DisplayServer.xml')
-rw-r--r--doc/classes/DisplayServer.xml40
1 files changed, 32 insertions, 8 deletions
diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml
index 8436cbf6ee..eb8ed56a02 100644
--- a/doc/classes/DisplayServer.xml
+++ b/doc/classes/DisplayServer.xml
@@ -119,9 +119,33 @@
<param index="6" name="callback" type="Callable" />
<description>
Displays OS native dialog for selecting files or directories in the file system.
- Callbacks have the following arguments: [code]bool status, PackedStringArray selected_paths, int selected_filter_index[/code].
- [b]Note:[/b] This method is implemented if the display server has the [constant FEATURE_NATIVE_DIALOG] feature.
- [b]Note:[/b] This method is implemented on Linux, Windows and macOS.
+ Callbacks have the following arguments: [code]status: bool, selected_paths: PackedStringArray, selected_filter_index: int[/code].
+ [b]Note:[/b] This method is implemented if the display server has the [constant FEATURE_NATIVE_DIALOG] feature, i.e. Linux, Windows, and macOS.
+ [b]Note:[/b] [param current_directory] might be ignored.
+ [b]Note:[/b] On Linux, [param show_hidden] is ignored.
+ [b]Note:[/b] On macOS, native file dialogs have no title.
+ [b]Note:[/b] On macOS, sandboxed apps will save security-scoped bookmarks to retain access to the opened folders across multiple sessions. Use [method OS.get_granted_permissions] to get a list of saved bookmarks.
+ </description>
+ </method>
+ <method name="file_dialog_with_options_show">
+ <return type="int" enum="Error" />
+ <param index="0" name="title" type="String" />
+ <param index="1" name="current_directory" type="String" />
+ <param index="2" name="root" type="String" />
+ <param index="3" name="filename" type="String" />
+ <param index="4" name="show_hidden" type="bool" />
+ <param index="5" name="mode" type="int" enum="DisplayServer.FileDialogMode" />
+ <param index="6" name="filters" type="PackedStringArray" />
+ <param index="7" name="options" type="Dictionary[]" />
+ <param index="8" name="callback" type="Callable" />
+ <description>
+ Displays OS native dialog for selecting files or directories in the file system with additional user selectable options.
+ [param options] is array of [Dictionary]s with the following keys:
+ - [code]"name"[/code] - option's name [String].
+ - [code]"values"[/code] - [PackedStringArray] of values. If empty, boolean option (check box) is used.
+ - [code]"default"[/code] - default selected option index ([int]) or default boolean value ([bool]).
+ Callbacks have the following arguments: [code]status: bool, selected_paths: PackedStringArray, selected_filter_index: int, selected_option: Dictionary[/code].
+ [b]Note:[/b] This method is implemented if the display server has the [constant FEATURE_NATIVE_DIALOG] feature, i.e. Linux, Windows, and macOS.
[b]Note:[/b] [param current_directory] might be ignored.
[b]Note:[/b] On Linux, [param show_hidden] is ignored.
[b]Note:[/b] On macOS, native file dialogs have no title.
@@ -1754,7 +1778,7 @@
The ID of the main window spawned by the engine, which can be passed to methods expecting a [code]window_id[/code].
</constant>
<constant name="INVALID_WINDOW_ID" value="-1">
- The ID that refers to a nonexisting window. This is be returned by some [DisplayServer] methods if no window matches the requested result.
+ The ID that refers to a nonexistent window. This is returned by some [DisplayServer] methods if no window matches the requested result.
</constant>
<constant name="SCREEN_LANDSCAPE" value="0" enum="ScreenOrientation">
Default landscape orientation.
@@ -1955,16 +1979,16 @@
[b]Note:[/b] This flag is implemented only on macOS.
</constant>
<constant name="VSYNC_DISABLED" value="0" enum="VSyncMode">
- No vertical synchronization, which means the engine will display frames as fast as possible (tearing may be visible). Framerate is unlimited (notwithstanding [member Engine.max_fps]).
+ No vertical synchronization, which means the engine will display frames as fast as possible (tearing may be visible). Framerate is unlimited (regardless of [member Engine.max_fps]).
</constant>
<constant name="VSYNC_ENABLED" value="1" enum="VSyncMode">
- Default vertical synchronization mode, the image is displayed only on vertical blanking intervals (no tearing is visible). Framerate is limited by the monitor refresh rate (notwithstanding [member Engine.max_fps]).
+ Default vertical synchronization mode, the image is displayed only on vertical blanking intervals (no tearing is visible). Framerate is limited by the monitor refresh rate (regardless of [member Engine.max_fps]).
</constant>
<constant name="VSYNC_ADAPTIVE" value="2" enum="VSyncMode">
- Behaves like [constant VSYNC_DISABLED] when the framerate drops below the screen's refresh rate to reduce stuttering (tearing may be visible). Otherwise, vertical synchronization is enabled to avoid tearing. Framerate is limited by the monitor refresh rate (notwithstanding [member Engine.max_fps]). Behaves like [constant VSYNC_ENABLED] when using the Compatibility rendering method.
+ Behaves like [constant VSYNC_DISABLED] when the framerate drops below the screen's refresh rate to reduce stuttering (tearing may be visible). Otherwise, vertical synchronization is enabled to avoid tearing. Framerate is limited by the monitor refresh rate (regardless of [member Engine.max_fps]). Behaves like [constant VSYNC_ENABLED] when using the Compatibility rendering method.
</constant>
<constant name="VSYNC_MAILBOX" value="3" enum="VSyncMode">
- Displays the most recent image in the queue on vertical blanking intervals, while rendering to the other images (no tearing is visible). Framerate is unlimited (notwithstanding [member Engine.max_fps]).
+ Displays the most recent image in the queue on vertical blanking intervals, while rendering to the other images (no tearing is visible). Framerate is unlimited (regardless of [member Engine.max_fps]).
Although not guaranteed, the images can be rendered as fast as possible, which may reduce input lag (also called "Fast" V-Sync mode). [constant VSYNC_MAILBOX] works best when at least twice as many frames as the display refresh rate are rendered. Behaves like [constant VSYNC_ENABLED] when using the Compatibility rendering method.
</constant>
<constant name="DISPLAY_HANDLE" value="0" enum="HandleType">