Commit e5033d39 by Rémi Verschelde

doc: Sync classref with DisplayServer/Window changes

parent 0926c192
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AcceptDialog" inherits="WindowDialog" version="4.0">
<class name="AcceptDialog" inherits="Window" version="4.0">
<brief_description>
Base dialog for user notification.
</brief_description>
......@@ -67,9 +67,16 @@
<member name="dialog_text" type="String" setter="set_text" getter="get_text" default="&quot;&quot;">
The text displayed by the dialog.
</member>
<member name="window_title" type="String" setter="set_title" getter="get_title" override="true" default="&quot;Alert!&quot;" />
<member name="title" type="String" setter="set_title" getter="get_title" override="true" default="&quot;Alert!&quot;" />
<member name="transient" type="bool" setter="set_transient" getter="is_transient" override="true" default="true" />
<member name="visible" type="bool" setter="set_visible" getter="is_visible" override="true" default="false" />
<member name="wrap_controls" type="bool" setter="set_wrap_controls" getter="is_wrapping_controls" override="true" default="true" />
</members>
<signals>
<signal name="cancelled">
<description>
</description>
</signal>
<signal name="confirmed">
<description>
Emitted when the dialog is accepted, i.e. the OK button is pressed.
......
......@@ -22,8 +22,9 @@
</method>
</methods>
<members>
<member name="rect_min_size" type="Vector2" setter="set_custom_minimum_size" getter="get_custom_minimum_size" override="true" default="Vector2( 200, 70 )" />
<member name="window_title" type="String" setter="set_title" getter="get_title" override="true" default="&quot;Please Confirm...&quot;" />
<member name="min_size" type="Vector2i" setter="set_min_size" getter="get_min_size" override="true" default="Vector2i( 200, 70 )" />
<member name="size" type="Vector2i" setter="set_size" getter="get_size" override="true" default="Vector2i( 200, 100 )" />
<member name="title" type="String" setter="set_title" getter="get_title" override="true" default="&quot;Please Confirm...&quot;" />
</members>
<constants>
</constants>
......
......@@ -60,14 +60,13 @@
<member name="display_mode" type="int" setter="set_display_mode" getter="get_display_mode" enum="EditorFileDialog.DisplayMode" default="0">
The view format in which the [EditorFileDialog] displays resources to the user.
</member>
<member name="mode" type="int" setter="set_mode" getter="get_mode" enum="EditorFileDialog.Mode" default="4">
The purpose of the [EditorFileDialog], which defines the allowed behaviors.
<member name="file_mode" type="int" setter="set_file_mode" getter="get_file_mode" enum="EditorFileDialog.FileMode" default="4">
The dialog's open or save mode, which affects the selection behavior. See [enum FileMode]
</member>
<member name="resizable" type="bool" setter="set_resizable" getter="get_resizable" override="true" default="true" />
<member name="show_hidden_files" type="bool" setter="set_show_hidden_files" getter="is_showing_hidden_files" default="false">
If [code]true[/code], hidden files and directories will be visible in the [EditorFileDialog].
</member>
<member name="window_title" type="String" setter="set_title" getter="get_title" override="true" default="&quot;Save a File&quot;" />
<member name="title" type="String" setter="set_title" getter="get_title" override="true" default="&quot;Save a File&quot;" />
</members>
<signals>
<signal name="dir_selected">
......@@ -93,19 +92,19 @@
</signal>
</signals>
<constants>
<constant name="MODE_OPEN_FILE" value="0" enum="Mode">
<constant name="FILE_MODE_OPEN_FILE" value="0" enum="FileMode">
The [EditorFileDialog] can select only one file. Accepting the window will open the file.
</constant>
<constant name="MODE_OPEN_FILES" value="1" enum="Mode">
<constant name="FILE_MODE_OPEN_FILES" value="1" enum="FileMode">
The [EditorFileDialog] can select multiple files. Accepting the window will open all files.
</constant>
<constant name="MODE_OPEN_DIR" value="2" enum="Mode">
<constant name="FILE_MODE_OPEN_DIR" value="2" enum="FileMode">
The [EditorFileDialog] can select only one directory. Accepting the window will open the directory.
</constant>
<constant name="MODE_OPEN_ANY" value="3" enum="Mode">
<constant name="FILE_MODE_OPEN_ANY" value="3" enum="FileMode">
The [EditorFileDialog] can select a file or directory. Accepting the window will open it.
</constant>
<constant name="MODE_SAVE_FILE" value="4" enum="Mode">
<constant name="FILE_MODE_SAVE_FILE" value="4" enum="FileMode">
The [EditorFileDialog] can select only one file. Accepting the window will save the file.
</constant>
<constant name="ACCESS_RESOURCES" value="0" enum="Access">
......
......@@ -137,10 +137,6 @@
<member name="fog_transmit_enabled" type="bool" setter="set_fog_transmit_enabled" getter="is_fog_transmit_enabled" default="false">
Enables fog's light transmission effect. If [code]true[/code], light will be more visible in the fog to simulate light scattering as in real life.
</member>
<member name="glow_bicubic_upscale" type="bool" setter="set_glow_bicubic_upscale" getter="is_glow_bicubic_upscale_enabled" default="false">
Smooths out the blockiness created by sampling higher levels, at the cost of performance.
[b]Note:[/b] When using the GLES2 renderer, this is only available if the GPU supports the [code]GL_EXT_gpu_shader4[/code] extension.
</member>
<member name="glow_blend_mode" type="int" setter="set_glow_blend_mode" getter="get_glow_blend_mode" enum="Environment.GlowBlendMode" default="2">
The glow blending mode.
</member>
......
......@@ -68,19 +68,19 @@
The currently selected file path of the file dialog.
</member>
<member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok" override="true" default="false" />
<member name="file_mode" type="int" setter="set_file_mode" getter="get_file_mode" enum="FileDialog.FileMode" default="4">
The dialog's open or save mode, which affects the selection behavior. See [enum FileMode].
</member>
<member name="filters" type="PackedStringArray" setter="set_filters" getter="get_filters" default="PackedStringArray( )">
The available file type filters. For example, this shows only [code].png[/code] and [code].gd[/code] files: [code]set_filters(PackedStringArray(["*.png ; PNG Images","*.gd ; GDScript Files"]))[/code].
</member>
<member name="mode" type="int" setter="set_mode" getter="get_mode" enum="FileDialog.Mode" default="4">
The dialog's open or save mode, which affects the selection behavior. See enum [code]Mode[/code] constants.
</member>
<member name="mode_overrides_title" type="bool" setter="set_mode_overrides_title" getter="is_mode_overriding_title" default="true">
If [code]true[/code], changing the [code]Mode[/code] property will set the window title accordingly (e.g. setting mode to [constant MODE_OPEN_FILE] will change the window title to "Open a File").
If [code]true[/code], changing the [code]Mode[/code] property will set the window title accordingly (e.g. setting mode to [constant FILE_MODE_OPEN_FILE] will change the window title to "Open a File").
</member>
<member name="show_hidden_files" type="bool" setter="set_show_hidden_files" getter="is_showing_hidden_files" default="false">
If [code]true[/code], the dialog will show hidden files.
</member>
<member name="window_title" type="String" setter="set_title" getter="get_title" override="true" default="&quot;Save a File&quot;" />
<member name="title" type="String" setter="set_title" getter="get_title" override="true" default="&quot;Save a File&quot;" />
</members>
<signals>
<signal name="dir_selected">
......@@ -106,19 +106,19 @@
</signal>
</signals>
<constants>
<constant name="MODE_OPEN_FILE" value="0" enum="Mode">
<constant name="FILE_MODE_OPEN_FILE" value="0" enum="FileMode">
The dialog allows selecting one, and only one file.
</constant>
<constant name="MODE_OPEN_FILES" value="1" enum="Mode">
<constant name="FILE_MODE_OPEN_FILES" value="1" enum="FileMode">
The dialog allows selecting multiple files.
</constant>
<constant name="MODE_OPEN_DIR" value="2" enum="Mode">
<constant name="FILE_MODE_OPEN_DIR" value="2" enum="FileMode">
The dialog only allows selecting a directory, disallowing the selection of any file.
</constant>
<constant name="MODE_OPEN_ANY" value="3" enum="Mode">
<constant name="FILE_MODE_OPEN_ANY" value="3" enum="FileMode">
The dialog allows selecting one file or directory.
</constant>
<constant name="MODE_SAVE_FILE" value="4" enum="Mode">
<constant name="FILE_MODE_SAVE_FILE" value="4" enum="FileMode">
The dialog will warn when a file exists.
</constant>
<constant name="ACCESS_RESOURCES" value="0" enum="Access">
......
......@@ -43,7 +43,7 @@
If [code]true[/code], the key's state is pressed. If [code]false[/code], the key's state is released.
</member>
<member name="unicode" type="int" setter="set_unicode" getter="get_unicode" default="0">
The key Unicode identifier (when relevant). Unicode identifiers for the composite characters and complex scripts may not be available unless IME input mode is active. See [method OS.set_ime_active] for more information.
The key Unicode identifier (when relevant). Unicode identifiers for the composite characters and complex scripts may not be available unless IME input mode is active. See [method Window.set_ime_active] for more information.
</member>
</members>
<constants>
......
......@@ -7,6 +7,7 @@
[MainLoop] is the abstract base class for a Godot project's game loop. It is inherited by [SceneTree], which is the default game loop implementation used in Godot projects, though it is also possible to write and use one's own [MainLoop] subclass instead of the scene tree.
Upon the application start, a [MainLoop] implementation must be provided to the OS; otherwise, the application will exit. This happens automatically (and a [SceneTree] is created) unless a main [Script] is provided from the command line (with e.g. [code]godot -s my_loop.gd[/code], which should then be a [MainLoop] implementation.
Here is an example script implementing a simple [MainLoop]:
[b]FIXME:[/b] No longer valid after DisplayServer split and Input refactoring.
[codeblock]
extends MainLoop
......@@ -43,17 +44,6 @@
<tutorials>
</tutorials>
<methods>
<method name="_drop_files" qualifiers="virtual">
<return type="void">
</return>
<argument index="0" name="files" type="PackedStringArray">
</argument>
<argument index="1" name="from_screen" type="int">
</argument>
<description>
Called when files are dragged from the OS file manager and dropped in the game window. The arguments are a list of file paths and the identifier of the screen where the drag originated.
</description>
</method>
<method name="_finalize" qualifiers="virtual">
<return type="void">
</return>
......@@ -61,17 +51,6 @@
Called before the program exits.
</description>
</method>
<method name="_global_menu_action" qualifiers="virtual">
<return type="void">
</return>
<argument index="0" name="id" type="Variant">
</argument>
<argument index="1" name="meta" type="Variant">
</argument>
<description>
Called when the user performs an action in the system global menu (e.g. the Mac OS menu bar).
</description>
</method>
<method name="_idle" qualifiers="virtual">
<return type="bool">
</return>
......@@ -89,24 +68,6 @@
Called once during initialization.
</description>
</method>
<method name="_input_event" qualifiers="virtual">
<return type="void">
</return>
<argument index="0" name="event" type="InputEvent">
</argument>
<description>
Called whenever an [InputEvent] is received by the main loop.
</description>
</method>
<method name="_input_text" qualifiers="virtual">
<return type="void">
</return>
<argument index="0" name="text" type="String">
</argument>
<description>
Deprecated callback, does not do anything. Use [method _input_event] to parse text input. Will be removed in Godot 4.0.
</description>
</method>
<method name="_iteration" qualifiers="virtual">
<return type="bool">
</return>
......@@ -140,24 +101,6 @@
Should not be called manually, override [method _initialize] instead. Will be removed in Godot 4.0.
</description>
</method>
<method name="input_event">
<return type="void">
</return>
<argument index="0" name="event" type="InputEvent">
</argument>
<description>
Should not be called manually, override [method _input_event] instead. Will be removed in Godot 4.0.
</description>
</method>
<method name="input_text">
<return type="void">
</return>
<argument index="0" name="text" type="String">
</argument>
<description>
Should not be called manually, override [method _input_text] instead. Will be removed in Godot 4.0.
</description>
</method>
<method name="iteration">
<return type="bool">
</return>
......@@ -180,58 +123,30 @@
</signal>
</signals>
<constants>
<constant name="NOTIFICATION_WM_MOUSE_ENTER" value="1002">
Notification received from the OS when the mouse enters the game window.
Implemented on desktop and web platforms.
</constant>
<constant name="NOTIFICATION_WM_MOUSE_EXIT" value="1003">
Notification received from the OS when the mouse leaves the game window.
Implemented on desktop and web platforms.
</constant>
<constant name="NOTIFICATION_WM_FOCUS_IN" value="1004">
Notification received from the OS when the game window is focused.
Implemented on all platforms.
</constant>
<constant name="NOTIFICATION_WM_FOCUS_OUT" value="1005">
Notification received from the OS when the game window is unfocused.
Implemented on all platforms.
</constant>
<constant name="NOTIFICATION_WM_QUIT_REQUEST" value="1006">
Notification received from the OS when a quit request is sent (e.g. closing the window with a "Close" button or Alt+F4).
Implemented on desktop platforms.
</constant>
<constant name="NOTIFICATION_WM_GO_BACK_REQUEST" value="1007">
Notification received from the OS when a go back request is sent (e.g. pressing the "Back" button on Android).
Specific to the Android platform.
</constant>
<constant name="NOTIFICATION_WM_UNFOCUS_REQUEST" value="1008">
Notification received from the OS when an unfocus request is sent (e.g. another OS window wants to take the focus).
No supported platforms currently send this notification.
</constant>
<constant name="NOTIFICATION_OS_MEMORY_WARNING" value="1009">
<constant name="NOTIFICATION_OS_MEMORY_WARNING" value="2009">
Notification received from the OS when the application is exceeding its allocated memory.
Specific to the iOS platform.
</constant>
<constant name="NOTIFICATION_TRANSLATION_CHANGED" value="1010">
<constant name="NOTIFICATION_TRANSLATION_CHANGED" value="2010">
Notification received when translations may have changed. Can be triggered by the user changing the locale. Can be used to respond to language changes, for example to change the UI strings on the fly. Useful when working with the built-in translation support, like [method Object.tr].
</constant>
<constant name="NOTIFICATION_WM_ABOUT" value="1011">
<constant name="NOTIFICATION_WM_ABOUT" value="2011">
Notification received from the OS when a request for "About" information is sent.
Specific to the macOS platform.
</constant>
<constant name="NOTIFICATION_CRASH" value="1012">
<constant name="NOTIFICATION_CRASH" value="2012">
Notification received from Godot's crash handler when the engine is about to crash.
Implemented on desktop platforms if the crash handler is enabled.
</constant>
<constant name="NOTIFICATION_OS_IME_UPDATE" value="1013">
<constant name="NOTIFICATION_OS_IME_UPDATE" value="2013">
Notification received from the OS when an update of the Input Method Engine occurs (e.g. change of IME cursor position or composition string).
Specific to the macOS platform.
</constant>
<constant name="NOTIFICATION_APP_RESUMED" value="1014">
<constant name="NOTIFICATION_APP_RESUMED" value="2014">
Notification received from the OS when the app is resumed.
Specific to the Android platform.
</constant>
<constant name="NOTIFICATION_APP_PAUSED" value="1015">
<constant name="NOTIFICATION_APP_PAUSED" value="2015">
Notification received from the OS when the app is paused.
Specific to the Android platform.
</constant>
......
......@@ -38,9 +38,9 @@
<member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" override="true" default="true" />
</members>
<signals>
<signal name="about_to_show">
<signal name="about_to_popup">
<description>
Emitted when [PopupMenu] of this MenuButton is about to show.
Emitted when the [PopupMenu] of this MenuButton is about to show.
</description>
</signal>
</signals>
......
......@@ -53,7 +53,7 @@
<description>
Called when there is an input event. The input event propagates up through the node tree until a node consumes it.
It is only called if input processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process_input].
To consume the input event and stop it propagating further to other nodes, [method SceneTree.set_input_as_handled] can be called.
To consume the input event and stop it propagating further to other nodes, [method Viewport.set_input_as_handled] can be called.
For gameplay input, [method _unhandled_input] and [method _unhandled_key_input] are usually a better fit as they allow the GUI to intercept the events first.
</description>
</method>
......@@ -97,7 +97,7 @@
<description>
Called when an [InputEvent] hasn't been consumed by [method _input] or any GUI. The input event propagates up through the node tree until a node consumes it.
It is only called if unhandled input processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process_unhandled_input].
To consume the input event and stop it propagating further to other nodes, [method SceneTree.set_input_as_handled] can be called.
To consume the input event and stop it propagating further to other nodes, [method Viewport.set_input_as_handled] can be called.
For gameplay input, this and [method _unhandled_key_input] are usually a better fit than [method _input] as they allow the GUI to intercept the events first.
</description>
</method>
......@@ -109,7 +109,7 @@
<description>
Called when an [InputEventKey] hasn't been consumed by [method _input] or any GUI. The input event propagates up through the node tree until a node consumes it.
It is only called if unhandled key input processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process_unhandled_key_input].
To consume the input event and stop it propagating further to other nodes, [method SceneTree.set_input_as_handled] can be called.
To consume the input event and stop it propagating further to other nodes, [method Viewport.set_input_as_handled] can be called.
For gameplay input, this and [method _unhandled_input] are usually a better fit than [method _input] as they allow the GUI to intercept the events first.
</description>
</method>
......@@ -938,42 +938,40 @@
Notification received from the OS when the game window is unfocused.
Implemented on all platforms.
</constant>
<constant name="NOTIFICATION_WM_QUIT_REQUEST" value="1006">
Notification received from the OS when a quit request is sent (e.g. closing the window with a "Close" button or Alt+F4).
<constant name="NOTIFICATION_WM_CLOSE_REQUEST" value="1006">
Notification received from the OS when a close request is sent (e.g. closing the window with a "Close" button or Alt+F4).
Implemented on desktop platforms.
</constant>
<constant name="NOTIFICATION_WM_GO_BACK_REQUEST" value="1007">
Notification received from the OS when a go back request is sent (e.g. pressing the "Back" button on Android).
Specific to the Android platform.
</constant>
<constant name="NOTIFICATION_WM_UNFOCUS_REQUEST" value="1008">
Notification received from the OS when an unfocus request is sent (e.g. another OS window wants to take the focus).
No supported platforms currently send this notification.
<constant name="NOTIFICATION_WM_SIZE_CHANGED" value="1008">
</constant>
<constant name="NOTIFICATION_OS_MEMORY_WARNING" value="1009">
<constant name="NOTIFICATION_OS_MEMORY_WARNING" value="2009">
Notification received from the OS when the application is exceeding its allocated memory.
Specific to the iOS platform.
</constant>
<constant name="NOTIFICATION_TRANSLATION_CHANGED" value="1010">
<constant name="NOTIFICATION_TRANSLATION_CHANGED" value="2010">
Notification received when translations may have changed. Can be triggered by the user changing the locale. Can be used to respond to language changes, for example to change the UI strings on the fly. Useful when working with the built-in translation support, like [method Object.tr].
</constant>
<constant name="NOTIFICATION_WM_ABOUT" value="1011">
<constant name="NOTIFICATION_WM_ABOUT" value="2011">
Notification received from the OS when a request for "About" information is sent.
Specific to the macOS platform.
</constant>
<constant name="NOTIFICATION_CRASH" value="1012">
<constant name="NOTIFICATION_CRASH" value="2012">
Notification received from Godot's crash handler when the engine is about to crash.
Implemented on desktop platforms if the crash handler is enabled.
</constant>
<constant name="NOTIFICATION_OS_IME_UPDATE" value="1013">
<constant name="NOTIFICATION_OS_IME_UPDATE" value="2013">
Notification received from the OS when an update of the Input Method Engine occurs (e.g. change of IME cursor position or composition string).
Specific to the macOS platform.
</constant>
<constant name="NOTIFICATION_APP_RESUMED" value="1014">
<constant name="NOTIFICATION_APP_RESUMED" value="2014">
Notification received from the OS when the app is resumed.
Specific to the Android platform.
</constant>
<constant name="NOTIFICATION_APP_PAUSED" value="1015">
<constant name="NOTIFICATION_APP_PAUSED" value="2015">
Notification received from the OS when the app is paused.
Specific to the Android platform.
</constant>
......
......@@ -10,11 +10,21 @@
</tutorials>
<methods>
</methods>
<members>
<member name="mode" type="int" setter="set_mode" getter="get_mode" enum="Panel.Mode" default="0">
</member>
</members>
<constants>
<constant name="MODE_BACKGROUND" value="0" enum="Mode">
</constant>
<constant name="MODE_FOREGROUND" value="1" enum="Mode">
</constant>
</constants>
<theme_items>
<theme_item name="panel" type="StyleBox">
The style of this [Panel].
</theme_item>
<theme_item name="panel_fg" type="StyleBox">
</theme_item>
</theme_items>
</class>
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Popup" inherits="Control" version="4.0">
<class name="Popup" inherits="Window" version="4.0">
<brief_description>
Base container control for popups and dialogs.
</brief_description>
<description>
Popup is a base [Control] used to show dialogs and popups. It's a subwindow and modal by default (see [Control]) and has helpers for custom popup behavior. All popup methods ensure correct placement within the viewport.
Popup is a base [Control] used to show dialogs and popups. It's a subwindow and modal by default (see [Control]) and has helpers for custom popup behavior.
</description>
<tutorials>
</tutorials>
<methods>
<method name="popup">
<return type="void">
</return>
<argument index="0" name="bounds" type="Rect2" default="Rect2( 0, 0, 0, 0 )">
</argument>
<description>
Popup (show the control in modal form).
</description>
</method>
<method name="popup_centered">
<return type="void">
</return>
<argument index="0" name="size" type="Vector2" default="Vector2( 0, 0 )">
</argument>
<description>
Popup (show the control in modal form) in the center of the screen relative to its current canvas transform, at the current size, or at a size determined by [code]size[/code].
</description>
</method>
<method name="popup_centered_clamped">
<return type="void">
</return>
<argument index="0" name="size" type="Vector2" default="Vector2( 0, 0 )">
</argument>
<argument index="1" name="fallback_ratio" type="float" default="0.75">
</argument>
<description>
Popup (show the control in modal form) in the center of the screen relative to the current canvas transform, clamping the size to [code]size[/code], then ensuring the popup is no larger than the viewport size multiplied by [code]fallback_ratio[/code].
</description>
</method>
<method name="popup_centered_minsize">
<return type="void">
</return>
<argument index="0" name="minsize" type="Vector2" default="Vector2( 0, 0 )">
</argument>
<description>
Popup (show the control in modal form) in the center of the screen relative to the current canvas transform, ensuring the size is never smaller than [code]minsize[/code].
</description>
</method>
<method name="popup_centered_ratio">
<return type="void">
</return>
<argument index="0" name="ratio" type="float" default="0.75">
</argument>
<description>
Popup (show the control in modal form) in the center of the screen relative to the current canvas transform, scaled at a ratio of size of the screen.
</description>
</method>
<method name="set_as_minsize">
<return type="void">
</return>
<description>
Shrink popup to keep to the minimum size of content.
</description>
</method>
</methods>
<members>
<member name="popup_exclusive" type="bool" setter="set_exclusive" getter="is_exclusive" default="false">
If [code]true[/code], the popup will not be hidden when a click event occurs outside of it, or when it receives the [code]ui_cancel[/code] action event.
</member>
<member name="borderless" type="bool" setter="set_flag" getter="get_flag" override="true" default="true" />
<member name="transient" type="bool" setter="set_transient" getter="is_transient" override="true" default="true" />
<member name="unresizable" type="bool" setter="set_flag" getter="get_flag" override="true" default="true" />
<member name="visible" type="bool" setter="set_visible" getter="is_visible" override="true" default="false" />
<member name="wrap_controls" type="bool" setter="set_wrap_controls" getter="is_wrapping_controls" override="true" default="true" />
</members>
<signals>
<signal name="about_to_show">
<description>
Emitted when a popup is about to be shown. This is often used in [PopupMenu] to clear the list of options then create a new one according to the current context.
</description>
</signal>
<signal name="popup_hide">
<description>
Emitted when a popup is hidden.
......@@ -83,11 +25,5 @@
</signal>
</signals>
<constants>
<constant name="NOTIFICATION_POST_POPUP" value="80">
Notification sent right after the popup is shown.
</constant>
<constant name="NOTIFICATION_POPUP_HIDE" value="81">
Notification sent right after the popup is hidden.
</constant>
</constants>
</class>
<?xml version="1.0" encoding="UTF-8" ?>
<class name="PopupDialog" inherits="Popup" version="4.0">
<brief_description>
Base class for popup dialogs.
</brief_description>
<description>
PopupDialog is a base class for popup dialogs, along with [WindowDialog].
</description>
<tutorials>
</tutorials>
<methods>
</methods>
<constants>
</constants>
<theme_items>
<theme_item name="panel" type="StyleBox">
Sets a custom [StyleBox] for the panel of the [PopupDialog].
</theme_item>
</theme_items>
</class>
......@@ -330,13 +330,6 @@
Returns the tooltip associated with the specified index index [code]idx[/code].
</description>
</method>
<method name="is_hide_on_window_lose_focus" qualifiers="const">
<return type="bool">
</return>
<description>
Returns [code]true[/code] if the popup will be hidden when the window loses focus or not.
</description>
</method>
<method name="is_item_checkable" qualifiers="const">
<return type="bool">
</return>
......@@ -404,15 +397,6 @@
[b]Note:[/b] The indices of items after the removed item will be shifted by one.
</description>
</method>
<method name="set_hide_on_window_lose_focus">
<return type="void">
</return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
Hides the [PopupMenu] when the window loses focus.
</description>
</method>
<method name="set_item_accelerator">
<return type="void">
</return>
......@@ -604,7 +588,6 @@
<member name="allow_search" type="bool" setter="set_allow_search" getter="get_allow_search" default="false">
If [code]true[/code], allows to navigate [PopupMenu] with letter keys.
</member>
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" />
<member name="hide_on_checkable_item_selection" type="bool" setter="set_hide_on_checkable_item_selection" getter="is_hide_on_checkable_item_selection" default="true">
If [code]true[/code], hides the [PopupMenu] when a checkbox or radio button is selected.
</member>
......
......@@ -4,7 +4,7 @@
Class for displaying popups with a panel background.
</brief_description>
<description>
Class for displaying popups with a panel background. In some cases it might be simpler to use than [Popup], since it provides a configurable background. If you are making windows, better check [WindowDialog].
Class for displaying popups with a panel background. In some cases it might be simpler to use than [Popup], since it provides a configurable background. If you are making windows, better check [Window].
</description>
<tutorials>
</tutorials>
......
......@@ -202,7 +202,7 @@
Icon used for the project, set when project loads. Exporters will also use this icon when possible.
</member>
<member name="application/config/macos_native_icon" type="String" setter="" getter="" default="&quot;&quot;">
Icon set in [code].icns[/code] format used on macOS to set the game's icon. This is done automatically on start by calling [method OS.set_native_icon].
Icon set in [code].icns[/code] format used on macOS to set the game's icon. This is done automatically on start by calling [method DisplayServer.set_native_icon].
</member>
<member name="application/config/name" type="String" setter="" getter="" default="&quot;&quot;">
The project's name. It is used both by the Project Manager and by exporters. The project name can be translated by translating its value in localization files.
......@@ -215,7 +215,7 @@
If [code]true[/code], the project will save user data to its own user directory (see [member application/config/custom_user_dir_name]). This setting is only effective on desktop platforms. A name must be set in the [member application/config/custom_user_dir_name] setting for this to take effect. If [code]false[/code], the project will save user data to [code](OS user data directory)/Godot/app_userdata/(project name)[/code].
</member>
<member name="application/config/windows_native_icon" type="String" setter="" getter="" default="&quot;&quot;">
Icon set in [code].ico[/code] format used on Windows to set the game's icon. This is done automatically on start by calling [method OS.set_native_icon].
Icon set in [code].ico[/code] format used on Windows to set the game's icon. This is done automatically on start by calling [method DisplayServer.set_native_icon].
</member>
<member name="application/run/disable_stderr" type="bool" setter="" getter="" default="false">
If [code]true[/code], disables printing to standard error in an exported build.
......@@ -426,12 +426,6 @@
<member name="display/window/ios/hide_home_indicator" type="bool" setter="" getter="" default="true">
If [code]true[/code], the home indicator is hidden automatically. This only affects iOS devices without a physical home button.
</member>
<member name="display/window/per_pixel_transparency/allowed" type="bool" setter="" getter="" default="false">
If [code]true[/code], allows per-pixel transparency in a desktop window. This affects performance, so leave it on [code]false[/code] unless you need it.
</member>
<member name="display/window/per_pixel_transparency/enabled" type="bool" setter="" getter="" default="false">
Sets the window background to transparent when it starts.
</member>
<member name="display/window/size/always_on_top" type="bool" setter="" getter="" default="false">
Force the window to be always on top.
</member>
......@@ -1002,7 +996,9 @@
</member>
<member name="rendering/quality/driver/driver_name" type="String" setter="" getter="" default="&quot;Vulkan&quot;">
The video driver to use ("GLES2" or "Vulkan").
[b]Note:[/b] The backend in use can be overridden at runtime via the [code]--video-driver[/code] command line argument. In such cases, this property is not updated, so use [method OS.get_current_video_driver] to query it at run-time.
[b]Note:[/b] The backend in use can be overridden at runtime via the [code]--rendering-driver[/code] command line argument.
[b]FIXME:[/b] No longer valid after DisplayServer split:
In such cases, this property is not updated, so use [code]OS.get_current_video_driver[/code] to query it at run-time.
</member>
<member name="rendering/quality/filters/depth_of_field_bokeh_quality" type="int" setter="" getter="" default="2">
</member>
......@@ -1027,6 +1023,10 @@
</member>
<member name="rendering/quality/gi_probes/quality" type="int" setter="" getter="" default="1">
</member>
<member name="rendering/quality/glow/upscale_mode" type="int" setter="" getter="" default="1">
</member>
<member name="rendering/quality/glow/upscale_mode.mobile" type="int" setter="" getter="" default="0">
</member>
<member name="rendering/quality/intended_usage/framebuffer_allocation" type="int" setter="" getter="" default="2">
Strategy used for framebuffer allocation. The simpler it is, the less resources it uses (but the less features it supports). If set to "2D Without Sampling" or "3D Without Effects", sample buffers will not be allocated. This means [code]SCREEN_TEXTURE[/code] and [code]DEPTH_TEXTURE[/code] will not be available in shaders and post-processing effects will not be available in the [Environment].
</member>
......
......@@ -763,8 +763,6 @@
</argument>
<argument index="10" name="hdr_luminance_cap" type="float">
</argument>
<argument index="11" name="bicubic_upscale" type="bool">
</argument>
<description>
</description>
</method>
......@@ -2812,7 +2810,7 @@
<argument index="2" name="screen" type="int" default="0">
</argument>
<description>
Copies viewport to a region of the screen specified by [code]rect[/code]. If [member Viewport.render_direct_to_screen] is [code]true[/code], then viewport does not use a framebuffer and the contents of the viewport are rendered directly to screen. However, note that the root viewport is drawn last, therefore it will draw over the screen. Accordingly, you must set the root viewport to an area that does not cover the area that you have attached this viewport to.
Copies the viewport to a region of the screen specified by [code]rect[/code]. If [method viewport_set_render_direct_to_screen] is [code]true[/code], then the viewport does not use a framebuffer and the contents of the viewport are rendered directly to screen. However, note that the root viewport is drawn last, therefore it will draw over the screen. Accordingly, you must set the root viewport to an area that does not cover the area that you have attached this viewport to.
For example, you can set the root viewport to not render at all with the following code:
[codeblock]
func _ready():
......@@ -2830,15 +2828,6 @@
Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method.
</description>
</method>
<method name="viewport_detach">
<return type="void">
</return>
<argument index="0" name="viewport" type="RID">
</argument>
<description>
Detaches the viewport from the screen.
</description>
</method>
<method name="viewport_get_render_info">
<return type="int">
</return>
......@@ -3378,7 +3367,9 @@
<constant name="VIEWPORT_UPDATE_WHEN_VISIBLE" value="2" enum="ViewportUpdateMode">
Update the viewport whenever it is visible.
</constant>
<constant name="VIEWPORT_UPDATE_ALWAYS" value="3" enum="ViewportUpdateMode">
<constant name="VIEWPORT_UPDATE_WHEN_PARENT_VISIBLE" value="3" enum="ViewportUpdateMode">
</constant>
<constant name="VIEWPORT_UPDATE_ALWAYS" value="4" enum="ViewportUpdateMode">
Always update the viewport.
</constant>
<constant name="VIEWPORT_CLEAR_ALWAYS" value="0" enum="ViewportClearMode">
......
......@@ -135,13 +135,6 @@
Returns [code]true[/code] if there is a [member network_peer] set.
</description>
</method>
<method name="is_input_handled">
<return type="bool">
</return>
<description>
Returns [code]true[/code] if the most recent [InputEvent] was marked as handled with [method set_input_as_handled].
</description>
</method>
<method name="is_network_server" qualifiers="const">
<return type="bool">
</return>
......@@ -237,13 +230,6 @@
Sets the given [code]property[/code] to [code]value[/code] on all members of the given group, respecting the given [enum GroupCallFlags].
</description>
</method>
<method name="set_input_as_handled">
<return type="void">
</return>
<description>
Marks the most recent [InputEvent] as handled.
</description>
</method>
<method name="set_quit_on_go_back">
<return type="void">
</return>
......@@ -251,22 +237,7 @@
</argument>
<description>
If [code]true[/code], the application quits automatically on going back (e.g. on Android). Enabled by default.
To handle 'Go Back' button when this option is disabled, use [constant MainLoop.NOTIFICATION_WM_GO_BACK_REQUEST].
</description>
</method>
<method name="set_screen_stretch">
<return type="void">
</return>
<argument index="0" name="mode" type="int" enum="SceneTree.StretchMode">
</argument>
<argument index="1" name="aspect" type="int" enum="SceneTree.StretchAspect">
</argument>
<argument index="2" name="minsize" type="Vector2">
</argument>
<argument index="3" name="shrink" type="float" default="1">
</argument>
<description>
Configures screen stretching to the given [enum StretchMode], [enum StretchAspect], minimum size and [code]shrink[/code] ratio.
To handle 'Go Back' button when this option is disabled, use [constant DisplayServer.WINDOW_EVENT_GO_BACK_REQUEST].
</description>
</method>
</methods>
......@@ -301,11 +272,8 @@
<member name="refuse_new_network_connections" type="bool" setter="set_refuse_new_network_connections" getter="is_refusing_new_network_connections" default="false">
If [code]true[/code], the [SceneTree]'s [member network_peer] refuses new incoming connections.
</member>
<member name="root" type="Viewport" setter="" getter="get_root">
The [SceneTree]'s root [Viewport].
</member>
<member name="use_font_oversampling" type="bool" setter="set_use_font_oversampling" getter="is_using_font_oversampling" default="false">
If [code]true[/code], font oversampling is used.
<member name="root" type="Window" setter="" getter="get_root">
The [SceneTree]'s root [Window].
</member>
</members>
<signals>
......@@ -328,15 +296,6 @@
Emitted when files are dragged from the OS file manager and dropped in the game window. The arguments are a list of file paths and the identifier of the screen where the drag originated.
</description>
</signal>
<signal name="global_menu_action">
<argument index="0" name="id" type="Variant">
</argument>
<argument index="1" name="meta" type="Variant">
</argument>
<description>
Emitted whenever global menu item is clicked.
</description>
</signal>
<signal name="idle_frame">
<description>
Emitted immediately before [method Node._process] is called on every node in the [SceneTree].
......@@ -389,11 +348,6 @@
Emitted immediately before [method Node._physics_process] is called on every node in the [SceneTree].
</description>
</signal>
<signal name="screen_resized">
<description>
Emitted when the screen resolution (fullscreen) or window size (windowed) changes.
</description>
</signal>
<signal name="server_disconnected">
<description>
Emitted whenever this [SceneTree]'s [member network_peer] disconnected from server. Only emitted on clients.
......@@ -418,29 +372,5 @@
<constant name="GROUP_CALL_UNIQUE" value="4" enum="GroupCallFlags">
Call a group only once even if the call is executed many times.
</constant>
<constant name="STRETCH_MODE_DISABLED" value="0" enum="StretchMode">
No stretching.
</constant>
<constant name="STRETCH_MODE_2D" value="1" enum="StretchMode">
Render stretching in higher resolution (interpolated).
</constant>
<constant name="STRETCH_MODE_VIEWPORT" value="2" enum="StretchMode">
Keep the specified display resolution. No interpolation. Content may appear pixelated.
</constant>
<constant name="STRETCH_ASPECT_IGNORE" value="0" enum="StretchAspect">
Fill the window with the content stretched to cover excessive space. Content may appear stretched.
</constant>
<constant name="STRETCH_ASPECT_KEEP" value="1" enum="StretchAspect">
Retain the same aspect ratio by padding with black bars on either axis. This prevents distortion.
</constant>
<constant name="STRETCH_ASPECT_KEEP_WIDTH" value="2" enum="StretchAspect">
Expand vertically. Left/right black bars may appear if the window is too wide.
</constant>
<constant name="STRETCH_ASPECT_KEEP_HEIGHT" value="3" enum="StretchAspect">
Expand horizontally. Top/bottom black bars may appear if the window is too tall.
</constant>
<constant name="STRETCH_ASPECT_EXPAND" value="4" enum="StretchAspect">
Expand in both directions, retaining the same aspect ratio. This prevents distortion while avoiding black bars.
</constant>
</constants>
</class>
......@@ -4,7 +4,7 @@
The Editor's popup dialog for creating new [Script] files.
</brief_description>
<description>
The [ScriptCreateDialog] creates script files according to a given template for a given scripting language. The standard use is to configure its fields prior to calling one of the [method Popup.popup] methods.
The [ScriptCreateDialog] creates script files according to a given template for a given scripting language. The standard use is to configure its fields prior to calling one of the [method Window.popup] methods.
[codeblock]
func _ready():
dialog.config("Node", "res://new_node.gd") # For in-engine types
......@@ -33,10 +33,7 @@
</methods>
<members>
<member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok" override="true" default="false" />
<member name="margin_bottom" type="float" setter="set_margin" getter="get_margin" override="true" default="232.0" />
<member name="margin_right" type="float" setter="set_margin" getter="get_margin" override="true" default="361.0" />
<member name="rect_size" type="Vector2" setter="_set_size" getter="get_size" override="true" default="Vector2( 361, 232 )" />
<member name="window_title" type="String" setter="set_title" getter="get_title" override="true" default="&quot;Attach Node Script&quot;" />
<member name="title" type="String" setter="set_title" getter="get_title" override="true" default="&quot;Attach Node Script&quot;" />
</members>
<signals>
<signal name="script_created">
......
......@@ -44,13 +44,6 @@
Returns the total transform of the viewport.
</description>
</method>
<method name="get_modal_stack_top" qualifiers="const">
<return type="Control">
</return>
<description>
Returns the topmost modal in the stack.
</description>
</method>
<method name="get_mouse_position" qualifiers="const">
<return type="Vector2">
</return>
......@@ -76,13 +69,6 @@
Returns the [enum ShadowAtlasQuadrantSubdiv] of the specified quadrant.
</description>
</method>
<method name="get_size_override" qualifiers="const">
<return type="Vector2">
</return>
<description>
Returns the size override set with [method set_size_override].
</description>
</method>
<method name="get_texture" qualifiers="const">
<return type="ViewportTexture">
</return>
......@@ -116,13 +102,6 @@
Returns the drag data from the GUI, that was previously returned by [method Control.get_drag_data].
</description>
</method>
<method name="gui_has_modal_stack" qualifiers="const">
<return type="bool">
</return>
<description>
Returns [code]true[/code] if there are visible modals on-screen.
</description>
</method>
<method name="gui_is_dragging" qualifiers="const">
<return type="bool">
</return>
......@@ -133,31 +112,31 @@
<method name="input">
<return type="void">
</return>
<argument index="0" name="local_event" type="InputEvent">
<argument index="0" name="event" type="InputEvent">
</argument>
<argument index="1" name="in_local_coords" type="bool" default="false">
</argument>
<description>
</description>
</method>
<method name="is_input_handled" qualifiers="const">
<return type="bool">
<method name="input_text">
<return type="void">
</return>
<argument index="0" name="text" type="String">
</argument>
<description>
</description>
</method>
<method name="is_size_override_enabled" qualifiers="const">
<method name="is_embedding_subwindows" qualifiers="const">
<return type="bool">
</return>
<description>
Returns [code]true[/code] if the size override is enabled. See [method set_size_override].
</description>
</method>
<method name="set_attach_to_screen_rect">
<return type="void">
<method name="is_input_handled" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="rect" type="Rect2">
</argument>
<description>
Attaches this [Viewport] to the root [Viewport] with the specified rectangle. This bypasses the need for another node to display this [Viewport] but makes you responsible for updating the position of this [Viewport] manually.
</description>
</method>
<method name="set_input_as_handled">
......@@ -178,23 +157,12 @@
Sets the number of subdivisions to use in the specified quadrant. A higher number of subdivisions allows you to have more shadows in the scene at once, but reduces the quality of the shadows. A good practice is to have quadrants with a varying number of subdivisions and to have as few subdivisions as possible.
</description>
</method>
<method name="set_size_override">
<return type="void">
</return>
<argument index="0" name="enable" type="bool">
</argument>
<argument index="1" name="size" type="Vector2" default="Vector2( -1, -1 )">
</argument>
<argument index="2" name="margin" type="Vector2" default="Vector2( 0, 0 )">
</argument>
<description>
Sets the size override of the viewport. If the [code]enable[/code] parameter is [code]true[/code] the override is used, otherwise it uses the default size. If the size parameter is [code](-1, -1)[/code], it won't update the size.
</description>
</method>
<method name="unhandled_input">
<return type="void">
</return>
<argument index="0" name="local_event" type="InputEvent">
<argument index="0" name="event" type="InputEvent">
</argument>
<argument index="1" name="in_local_coords" type="bool" default="false">
</argument>
<description>
</description>
......@@ -217,9 +185,6 @@
</method>
</methods>
<members>
<member name="arvr" type="bool" setter="set_use_arvr" getter="use_arvr" default="false">
If [code]true[/code], the viewport will be used in AR/VR process.
</member>
<member name="audio_listener_enable_2d" type="bool" setter="set_as_audio_listener_2d" getter="is_audio_listener_2d" default="false">
If [code]true[/code], the viewport will process 2D audio streams.
</member>
......@@ -242,6 +207,8 @@
<member name="gui_disable_input" type="bool" setter="set_disable_input" getter="is_input_disabled" default="false">
If [code]true[/code], the viewport will not receive input event.
</member>
<member name="gui_embed_subwindows" type="bool" setter="set_embed_subwindows_hint" getter="get_embed_subwindows_hint" default="false">
</member>
<member name="gui_snap_controls_to_pixels" type="bool" setter="set_snap_controls_to_pixels" getter="is_snap_controls_to_pixels_enabled" default="true">
If [code]true[/code], the GUI controls on the viewport will lay pixel perfectly.
</member>
......@@ -256,15 +223,6 @@
<member name="physics_object_picking" type="bool" setter="set_physics_object_picking" getter="get_physics_object_picking" default="false">
If [code]true[/code], the objects rendered by viewport become subjects of mouse picking process.
</member>
<member name="render_direct_to_screen" type="bool" setter="set_use_render_direct_to_screen" getter="is_using_render_direct_to_screen" default="false">
If [code]true[/code], renders the Viewport directly to the screen instead of to the root viewport. Only available in GLES2. This is a low-level optimization and should not be used in most cases. If used, reading from the Viewport or from [code]SCREEN_TEXTURE[/code] becomes unavailable. For more information see [method RenderingServer.viewport_set_render_direct_to_screen].
</member>
<member name="render_target_clear_mode" type="int" setter="set_clear_mode" getter="get_clear_mode" enum="Viewport.ClearMode" default="0">
The clear mode when viewport used as a render target.
</member>
<member name="render_target_update_mode" type="int" setter="set_update_mode" getter="get_update_mode" enum="Viewport.UpdateMode" default="2">
The update mode when viewport used as a render target.
</member>
<member name="shadow_atlas_quad_0" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="2">
The subdivision amount of the first quadrant on the shadow atlas.
</member>
......@@ -281,12 +239,6 @@
The shadow atlas' resolution (used for omni and spot lights). The value will be rounded up to the nearest power of 2.
[b]Note:[/b] If this is set to 0, shadows won't be visible. Since user-created viewports default to a value of 0, this value must be set above 0 manually.
</member>
<member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2( 0, 0 )">
The width and height of viewport.
</member>
<member name="size_override_stretch" type="bool" setter="set_size_override_stretch" getter="is_size_override_stretch_enabled" default="false">
If [code]true[/code], the size override affects stretch as well.
</member>
<member name="transparent_bg" type="bool" setter="set_transparent_background" getter="has_transparent_background" default="false">
If [code]true[/code], the viewport should render its background as transparent.
</member>
......@@ -307,23 +259,11 @@
</signal>
<signal name="size_changed">
<description>
Emitted when the size of the viewport is changed, whether by [method set_size_override], resize of window, or some other means.
Emitted when the size of the viewport is changed, whether by resizing of window, or some other means.
</description>
</signal>
</signals>
<constants>
<constant name="UPDATE_DISABLED" value="0" enum="UpdateMode">
Do not update the render target.
</constant>
<constant name="UPDATE_ONCE" value="1" enum="UpdateMode">
Update the render target once, then switch to [constant UPDATE_DISABLED].
</constant>
<constant name="UPDATE_WHEN_VISIBLE" value="2" enum="UpdateMode">
Update the render target only when it is visible. This is the default value.
</constant>
<constant name="UPDATE_ALWAYS" value="3" enum="UpdateMode">
Always update the render target.
</constant>
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED" value="0" enum="ShadowAtlasQuadrantSubdiv">
This quadrant will not be used.
</constant>
......@@ -410,15 +350,6 @@
<constant name="MSAA_16X" value="4" enum="MSAA">
Use 16x Multisample Antialiasing. Likely unsupported on medium and low-end hardware.
</constant>
<constant name="CLEAR_MODE_ALWAYS" value="0" enum="ClearMode">
Always clear the render target before drawing.
</constant>
<constant name="CLEAR_MODE_NEVER" value="1" enum="ClearMode">
Never clear the render target.
</constant>
<constant name="CLEAR_MODE_ONLY_NEXT_FRAME" value="2" enum="ClearMode">
Clear the render target next frame, then switch to [constant CLEAR_MODE_NEVER].
</constant>
<constant name="DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST" value="0" enum="DefaultCanvasItemTextureFilter">
</constant>
<constant name="DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR" value="1" enum="DefaultCanvasItemTextureFilter">
......
<?xml version="1.0" encoding="UTF-8" ?>
<class name="WindowDialog" inherits="Popup" version="4.0">
<brief_description>
Base class for window dialogs.
</brief_description>
<description>
Windowdialog is the base class for all window-based dialogs. It's a by-default toplevel [Control] that draws a window decoration and allows motion and resizing.
</description>
<tutorials>
</tutorials>
<methods>
<method name="get_close_button">
<return type="TextureButton">
</return>
<description>
Returns the close [TextureButton].
</description>
</method>
</methods>
<members>
<member name="resizable" type="bool" setter="set_resizable" getter="get_resizable" default="false">
If [code]true[/code], the user can resize the window.
</member>
<member name="window_title" type="String" setter="set_title" getter="get_title" default="&quot;&quot;">
The text displayed in the window's title bar.
</member>
</members>
<constants>
</constants>
<theme_items>
<theme_item name="close" type="Texture2D">
The icon for the close button.
</theme_item>
<theme_item name="close_h_ofs" type="int" default="18">
The horizontal offset of the close button.
</theme_item>
<theme_item name="close_highlight" type="Texture2D">
The icon used for the close button when it's hovered with the mouse cursor.
</theme_item>
<theme_item name="close_v_ofs" type="int" default="18">
The vertical offset of the close button.
</theme_item>
<theme_item name="panel" type="StyleBox">
The style for both the content background of the [WindowDialog] and the title bar.
</theme_item>
<theme_item name="scaleborder_size" type="int" default="4">
The thickness of the border that can be dragged when scaling the window (if [member resizable] is enabled).
</theme_item>
<theme_item name="title_color" type="Color" default="Color( 0, 0, 0, 1 )">
The color of the title text.
</theme_item>
<theme_item name="title_font" type="Font">
The font used to draw the title.
</theme_item>
<theme_item name="title_height" type="int" default="20">
The vertical offset of the title text.
</theme_item>
</theme_items>
</class>
......@@ -77,7 +77,7 @@ public:
void environment_set_camera_feed_id(RID p_env, int p_camera_feed_id) {}
#endif
void environment_set_glow(RID p_env, bool p_enable, int p_level_flags, float p_intensity, float p_strength, float p_mix, float p_bloom_threshold, RS::EnvironmentGlowBlendMode p_blend_mode, float p_hdr_bleed_threshold, float p_hdr_bleed_scale, float p_hdr_luminance_cap, bool p_bicubic_upscale) {}
void environment_set_glow(RID p_env, bool p_enable, int p_level_flags, float p_intensity, float p_strength, float p_mix, float p_bloom_threshold, RS::EnvironmentGlowBlendMode p_blend_mode, float p_hdr_bleed_threshold, float p_hdr_bleed_scale, float p_hdr_luminance_cap) {}
void environment_set_fog(RID p_env, bool p_enable, float p_begin, float p_end, RID p_gradient_texture) {}
......
......@@ -29,6 +29,7 @@
/*************************************************************************/
#include "panel.h"
#include "core/print_string.h"
void Panel::_notification(int p_what) {
......@@ -54,7 +55,11 @@ void Panel::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_mode"), &Panel::get_mode);
ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Background,Foreground"), "set_mode", "get_mode");
BIND_ENUM_CONSTANT(MODE_BACKGROUND);
BIND_ENUM_CONSTANT(MODE_FOREGROUND);
}
Panel::Panel() {
// Has visible stylebox, so stop by default.
set_mouse_filter(MOUSE_FILTER_STOP);
......
......@@ -40,7 +40,7 @@ class Panel : public Control {
public:
enum Mode {
MODE_BACKGROUND,
MODE_FOREGROUND
MODE_FOREGROUND,
};
private:
......@@ -59,4 +59,5 @@ public:
};
VARIANT_ENUM_CAST(Panel::Mode)
#endif
#endif // PANEL_H
......@@ -43,7 +43,7 @@ public:
MODE_WINDOWED = DisplayServer::WINDOW_MODE_WINDOWED,
MODE_MINIMIZED = DisplayServer::WINDOW_MODE_MINIMIZED,
MODE_MAXIMIZED = DisplayServer::WINDOW_MODE_MAXIMIZED,
MODE_FULLSCREEN = DisplayServer::WINDOW_MODE_FULLSCREEN
MODE_FULLSCREEN = DisplayServer::WINDOW_MODE_FULLSCREEN,
};
enum Flags {
......@@ -59,7 +59,6 @@ public:
CONTENT_SCALE_MODE_DISABLED,
CONTENT_SCALE_MODE_OBJECTS,
CONTENT_SCALE_MODE_PIXELS,
};
enum ContentScaleAspect {
......@@ -68,10 +67,10 @@ public:
CONTENT_SCALE_ASPECT_KEEP_WIDTH,
CONTENT_SCALE_ASPECT_KEEP_HEIGHT,
CONTENT_SCALE_ASPECT_EXPAND,
};
enum {
DEFAULT_WINDOW_SIZE = 100
DEFAULT_WINDOW_SIZE = 100,
};
private:
......@@ -258,8 +257,8 @@ public:
~Window();
};
VARIANT_ENUM_CAST(Window::Window::Mode);
VARIANT_ENUM_CAST(Window::Window::Flags);
VARIANT_ENUM_CAST(Window::Mode);
VARIANT_ENUM_CAST(Window::Flags);
VARIANT_ENUM_CAST(Window::ContentScaleMode);
VARIANT_ENUM_CAST(Window::ContentScaleAspect);
......
......@@ -1802,7 +1802,7 @@ void RenderingServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("environment_set_bg_energy", "env", "energy"), &RenderingServer::environment_set_bg_energy);
ClassDB::bind_method(D_METHOD("environment_set_canvas_max_layer", "env", "max_layer"), &RenderingServer::environment_set_canvas_max_layer);
ClassDB::bind_method(D_METHOD("environment_set_ambient_light", "env", "color", "ambient", "energy", "sky_contibution", "reflection_source", "ao_color"), &RenderingServer::environment_set_ambient_light, DEFVAL(RS::ENV_AMBIENT_SOURCE_BG), DEFVAL(1.0), DEFVAL(0.0), DEFVAL(RS::ENV_REFLECTION_SOURCE_BG), DEFVAL(Color()));
ClassDB::bind_method(D_METHOD("environment_set_glow", "env", "enable", "level_flags", "intensity", "strength", "mix", "bloom_threshold", "blend_mode", "hdr_bleed_threshold", "hdr_bleed_scale", "hdr_luminance_cap", "bicubic_upscale"), &RenderingServer::environment_set_glow);
ClassDB::bind_method(D_METHOD("environment_set_glow", "env", "enable", "level_flags", "intensity", "strength", "mix", "bloom_threshold", "blend_mode", "hdr_bleed_threshold", "hdr_bleed_scale", "hdr_luminance_cap"), &RenderingServer::environment_set_glow);
ClassDB::bind_method(D_METHOD("environment_set_tonemap", "env", "tone_mapper", "exposure", "white", "auto_exposure", "min_luminance", "max_luminance", "auto_exp_speed", "auto_exp_grey"), &RenderingServer::environment_set_tonemap);
ClassDB::bind_method(D_METHOD("environment_set_adjustment", "env", "enable", "brightness", "contrast", "saturation", "ramp"), &RenderingServer::environment_set_adjustment);
ClassDB::bind_method(D_METHOD("environment_set_ssr", "env", "enable", "max_steps", "fade_in", "fade_out", "depth_tolerance", "roughness"), &RenderingServer::environment_set_ssr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment