diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml index 01540383dc5..99b566e74f9 100644 --- a/doc/classes/AcceptDialog.xml +++ b/doc/classes/AcceptDialog.xml @@ -1,5 +1,5 @@ - + Base dialog for user notification. @@ -67,9 +67,16 @@ The text displayed by the dialog. - + + + + + + + + Emitted when the dialog is accepted, i.e. the OK button is pressed. diff --git a/doc/classes/ConfirmationDialog.xml b/doc/classes/ConfirmationDialog.xml index 801d9508ddb..6d5871508b0 100644 --- a/doc/classes/ConfirmationDialog.xml +++ b/doc/classes/ConfirmationDialog.xml @@ -22,8 +22,9 @@ - - + + + diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index 89db5baf8a6..85a75fda37c 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -7,10 +7,12 @@ Base class for all UI-related nodes. [Control] features a bounding rectangle that defines its extents, an anchor position relative to its parent control or the current viewport, and margins that represent an offset to the anchor. The margins update automatically when the node, any of its parents, or the screen size change. For more information on Godot's UI system, anchors, margins, and containers, see the related tutorials in the manual. To build flexible UIs, you'll need a mix of UI elements that inherit from [Control] and [Container] nodes. [b]User Interface nodes and input[/b] - Godot sends input events to the scene's root node first, by calling [method Node._input]. [method Node._input] forwards the event down the node tree to the nodes under the mouse cursor, or on keyboard focus. To do so, it calls [method MainLoop._input_event]. Call [method accept_event] so no other node receives the event. Once you accepted an input, it becomes handled so [method Node._unhandled_input] will not process it. + Godot sends input events to the scene's root node first, by calling [method Node._input]. [method Node._input] forwards the event down the node tree to the nodes under the mouse cursor, or on keyboard focus. To do so, it calls [code]MainLoop._input_event[/code]. + [b]FIXME:[/b] No longer valid after DisplayServer split and Input refactoring. + Call [method accept_event] so no other node receives the event. Once you accepted an input, it becomes handled so [method Node._unhandled_input] will not process it. Only one [Control] node can be in keyboard focus. Only the node in focus will receive keyboard events. To get the focus, call [method grab_focus]. [Control] nodes lose focus when another node grabs it, or if you hide the node in focus. Sets [member mouse_filter] to [constant MOUSE_FILTER_IGNORE] to tell a [Control] node to ignore mouse or touch events. You'll need it if you place an icon on top of a button. - [Theme] resources change the Control's appearance. If you change the [Theme] on a [Control] node, it affects all of its children. To override some of the theme's parameters, call one of the [code]add_*_override[/code] methods, like [method add_font_override]. You can override the theme with the inspector. + [Theme] resources change the Control's appearance. If you change the [Theme] on a [Control] node, it affects all of its children. To override some of the theme's parameters, call one of the [code]add_theme_*_override[/code] methods, like [method add_theme_font_override]. You can override the theme with the inspector. https://docs.godotengine.org/en/latest/tutorials/gui/index.html @@ -87,7 +89,7 @@ Marks an input event as handled. Once you accept an input event, it stops propagating, even to nodes listening to [method Node._unhandled_input] or [method Node._unhandled_key_input]. - + @@ -98,7 +100,7 @@ Overrides the [Color] with given [code]name[/code] in the [member theme] resource the control uses. If the [code]color[/code] is empty or invalid, the override is cleared and the color from assigned [Theme] is used. - + @@ -109,7 +111,7 @@ Overrides an integer constant with given [code]name[/code] in the [member theme] resource the control uses. If the [code]constant[/code] is empty or invalid, the override is cleared and the constant from assigned [Theme] is used. - + @@ -120,7 +122,7 @@ Overrides the font with given [code]name[/code] in the [member theme] resource the control uses. If [code]font[/code] is empty or invalid, the override is cleared and the font from assigned [Theme] is used. - + @@ -131,7 +133,7 @@ Overrides the icon with given [code]name[/code] in the [member theme] resource the control uses. If [code]icon[/code] is empty or invalid, the override is cleared and the icon from assigned [Theme] is used. - + @@ -142,7 +144,7 @@ Overrides the [Shader] with given [code]name[/code] in the [member theme] resource the control uses. If [code]shader[/code] is empty or invalid, the override is cleared and the shader from assigned [Theme] is used. - + @@ -217,21 +219,6 @@ Returns [member margin_left] and [member margin_top]. See also [member rect_position]. - - - - - - - - - Returns a color from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code]. - [codeblock] - func _ready(): - modulate = get_color("font_color", "Button") #get the color defined for button fonts - [/codeblock] - - @@ -239,17 +226,6 @@ Returns combined minimum size from [member rect_min_size] and [method get_minimum_size]. - - - - - - - - - Returns a constant from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code]. - - @@ -298,17 +274,6 @@ Returns the control that has the keyboard focus or [code]null[/code] if none. - - - - - - - - - Returns a font from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code]. - - @@ -316,17 +281,6 @@ Returns the position and size of the control relative to the top-left corner of the screen. See [member rect_position] and [member rect_size]. - - - - - - - - - Returns an icon from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code]. - - @@ -371,7 +325,55 @@ Returns the rotation (in radians). - + + + + + + + + + Returns a color from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code]. + [codeblock] + func _ready(): + modulate = get_theme_color("font_color", "Button") #get the color defined for button fonts + [/codeblock] + + + + + + + + + + + Returns a constant from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code]. + + + + + + + + + + + Returns a font from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code]. + + + + + + + + + + + Returns an icon from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code]. + + + @@ -409,46 +411,6 @@ Steal the focus from another control and become the focused control (see [member focus_mode]). - - - - - - - - - Returns [code]true[/code] if [Color] with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme]. - - - - - - - - - Returns [code]true[/code] if [Color] with given [code]name[/code] has a valid override in this [Control] node. - - - - - - - - - - - Returns [code]true[/code] if constant with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme]. - - - - - - - - - Returns [code]true[/code] if constant with given [code]name[/code] has a valid override in this [Control] node. - - @@ -456,46 +418,6 @@ Returns [code]true[/code] if this is the current focused control. See [member focus_mode]. - - - - - - - - - Returns [code]true[/code] if font with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme]. - - - - - - - - - Returns [code]true[/code] if font with given [code]name[/code] has a valid override in this [Control] node. - - - - - - - - - - - Returns [code]true[/code] if icon with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme]. - - - - - - - - - Returns [code]true[/code] if icon with given [code]name[/code] has a valid override in this [Control] node. - - @@ -507,7 +429,87 @@ [b]Note:[/b] If you want to check if a point is inside the control, you can use [code]get_rect().has_point(point)[/code]. - + + + + + + + + + Returns [code]true[/code] if [Color] with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme]. + + + + + + + + + Returns [code]true[/code] if [Color] with given [code]name[/code] has a valid override in this [Control] node. + + + + + + + + + + + Returns [code]true[/code] if constant with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme]. + + + + + + + + + Returns [code]true[/code] if constant with given [code]name[/code] has a valid override in this [Control] node. + + + + + + + + + + + Returns [code]true[/code] if font with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme]. + + + + + + + + + Returns [code]true[/code] if font with given [code]name[/code] has a valid override in this [Control] node. + + + + + + + + + + + Returns [code]true[/code] if icon with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme]. + + + + + + + + + Returns [code]true[/code] if icon with given [code]name[/code] has a valid override in this [Control] node. + + + @@ -516,7 +518,7 @@ Returns [code]true[/code] if [Shader] with given [code]name[/code] has a valid override in this [Control] node. - + @@ -527,7 +529,7 @@ Returns [code]true[/code] if [StyleBox] with given [code]name[/code] and associated with [Control] of given [code]type[/code] exists in assigned [Theme]. - + @@ -757,16 +759,6 @@ If [code]keep_margins[/code] is [code]true[/code], control's anchors will be updated instead of margins. - - - - - - - Displays a control as modal. Control must be a subwindow. Modal controls capture the input signals until closed or the area outside them is accessed. When a modal control loses focus, or the ESC key is pressed, they automatically hide. Modal controls are used extensively for popup dialogs and menus. - If [code]exclusive[/code] is [code]true[/code], other controls will not receive input and clicking outside this control will not close it. - - @@ -905,11 +897,6 @@ Emitted when the node's minimum size changes. - - - Emitted when a modal [Control] is closed. See [method show_modal]. - - Emitted when the mouse enters the control's [code]Rect[/code] area, provided its [member mouse_filter] lets the event reach it. @@ -930,6 +917,10 @@ Emitted when one of the size flags changes. See [member size_flags_horizontal] and [member size_flags_vertical]. + + + + @@ -957,10 +948,7 @@ Sent when the node loses focus. - Sent when the node's [member theme] changes, right before Godot redraws the control. Happens when you call one of the [code]add_*_override[/code] methods. - - - Sent when an open modal dialog closes. See [method show_modal]. + Sent when the node's [member theme] changes, right before Godot redraws the control. Happens when you call one of the [code]add_theme_*_override[/code] methods. Sent when this node is inside a [ScrollContainer] which has begun being scrolled. diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml new file mode 100644 index 00000000000..7fa64c21cb9 --- /dev/null +++ b/doc/classes/DisplayServer.xml @@ -0,0 +1,1059 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/EditorFileDialog.xml b/doc/classes/EditorFileDialog.xml index 3e6bbd682df..084459e5182 100644 --- a/doc/classes/EditorFileDialog.xml +++ b/doc/classes/EditorFileDialog.xml @@ -60,14 +60,13 @@ The view format in which the [EditorFileDialog] displays resources to the user. - - The purpose of the [EditorFileDialog], which defines the allowed behaviors. + + The dialog's open or save mode, which affects the selection behavior. See [enum FileMode] - If [code]true[/code], hidden files and directories will be visible in the [EditorFileDialog]. - + @@ -93,19 +92,19 @@ - + The [EditorFileDialog] can select only one file. Accepting the window will open the file. - + The [EditorFileDialog] can select multiple files. Accepting the window will open all files. - + The [EditorFileDialog] can select only one directory. Accepting the window will open the directory. - + The [EditorFileDialog] can select a file or directory. Accepting the window will open it. - + The [EditorFileDialog] can select only one file. Accepting the window will save the file. diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index c2e250d491c..18d1fc8eca8 100644 --- a/doc/classes/Environment.xml +++ b/doc/classes/Environment.xml @@ -137,10 +137,6 @@ 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. - - 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. - The glow blending mode. diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml index 78fcec33eae..99563ee3678 100644 --- a/doc/classes/FileDialog.xml +++ b/doc/classes/FileDialog.xml @@ -68,19 +68,19 @@ The currently selected file path of the file dialog. + + The dialog's open or save mode, which affects the selection behavior. See [enum FileMode]. + 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]. - - The dialog's open or save mode, which affects the selection behavior. See enum [code]Mode[/code] constants. - - 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"). If [code]true[/code], the dialog will show hidden files. - + @@ -106,19 +106,19 @@ - + The dialog allows selecting one, and only one file. - + The dialog allows selecting multiple files. - + The dialog only allows selecting a directory, disallowing the selection of any file. - + The dialog allows selecting one file or directory. - + The dialog will warn when a file exists. diff --git a/doc/classes/InputEventKey.xml b/doc/classes/InputEventKey.xml index c8d0769b90c..34afa905534 100644 --- a/doc/classes/InputEventKey.xml +++ b/doc/classes/InputEventKey.xml @@ -43,7 +43,7 @@ If [code]true[/code], the key's state is pressed. If [code]false[/code], the key's state is released. - 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. diff --git a/doc/classes/MainLoop.xml b/doc/classes/MainLoop.xml index af71c309366..7bb478fce22 100644 --- a/doc/classes/MainLoop.xml +++ b/doc/classes/MainLoop.xml @@ -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 @@ - - - - - - - - - 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. - - @@ -61,17 +51,6 @@ Called before the program exits. - - - - - - - - - Called when the user performs an action in the system global menu (e.g. the Mac OS menu bar). - - @@ -89,24 +68,6 @@ Called once during initialization. - - - - - - - Called whenever an [InputEvent] is received by the main loop. - - - - - - - - - Deprecated callback, does not do anything. Use [method _input_event] to parse text input. Will be removed in Godot 4.0. - - @@ -140,24 +101,6 @@ Should not be called manually, override [method _initialize] instead. Will be removed in Godot 4.0. - - - - - - - Should not be called manually, override [method _input_event] instead. Will be removed in Godot 4.0. - - - - - - - - - Should not be called manually, override [method _input_text] instead. Will be removed in Godot 4.0. - - @@ -180,58 +123,30 @@ - - Notification received from the OS when the mouse enters the game window. - Implemented on desktop and web platforms. - - - Notification received from the OS when the mouse leaves the game window. - Implemented on desktop and web platforms. - - - Notification received from the OS when the game window is focused. - Implemented on all platforms. - - - Notification received from the OS when the game window is unfocused. - Implemented on all platforms. - - - 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. - - - 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. - - - 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. - - + Notification received from the OS when the application is exceeding its allocated memory. Specific to the iOS platform. - + 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]. - + Notification received from the OS when a request for "About" information is sent. Specific to the macOS platform. - + Notification received from Godot's crash handler when the engine is about to crash. Implemented on desktop platforms if the crash handler is enabled. - + 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. - + Notification received from the OS when the app is resumed. Specific to the Android platform. - + Notification received from the OS when the app is paused. Specific to the Android platform. diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml index 6ec9d60df42..316315f777e 100644 --- a/doc/classes/MenuButton.xml +++ b/doc/classes/MenuButton.xml @@ -38,9 +38,9 @@ - + - Emitted when [PopupMenu] of this MenuButton is about to show. + Emitted when the [PopupMenu] of this MenuButton is about to show. diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index 717130728dd..d7bff83575e 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -53,7 +53,7 @@ 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. @@ -97,7 +97,7 @@ 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. @@ -109,7 +109,7 @@ 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. @@ -938,42 +938,40 @@ Notification received from the OS when the game window is unfocused. Implemented on all platforms. - - Notification received from the OS when a quit request is sent (e.g. closing the window with a "Close" button or Alt+F4). + + 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. 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. - - 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. + - + Notification received from the OS when the application is exceeding its allocated memory. Specific to the iOS platform. - + 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]. - + Notification received from the OS when a request for "About" information is sent. Specific to the macOS platform. - + Notification received from Godot's crash handler when the engine is about to crash. Implemented on desktop platforms if the crash handler is enabled. - + 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. - + Notification received from the OS when the app is resumed. Specific to the Android platform. - + Notification received from the OS when the app is paused. Specific to the Android platform. diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index d43c395433f..db79ee77651 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -9,24 +9,6 @@ - - - - - - - - - Displays a modal dialog box using the host OS' facilities. Execution is blocked until the dialog is closed. - - - - - - - Returns [code]true[/code] if the host OS allows drawing. - - @@ -34,13 +16,6 @@ Returns [code]true[/code] if the current host platform is using multiple threads. - - - - - Centers the window on the screen if in windowed mode. - - @@ -133,22 +108,6 @@ Returns the keycode of the given string (e.g. "Escape"). - - - - - Returns the total number of available audio drivers. - - - - - - - - - Returns the audio driver name for the given index. - - @@ -165,13 +124,6 @@ [b]Note:[/b] This method is implemented on Linux, macOS and Windows. - - - - - Returns the currently used video driver, using one of the values from [enum VideoDriver]. - - @@ -224,24 +176,6 @@ [b]Note:[/b] This method is implemented on Android. - - - - - Returns the IME cursor position (the currently-edited portion of the string) relative to the characters in the composition string. - [constant MainLoop.NOTIFICATION_OS_IME_UPDATE] is sent to the application to notify it of changes to the IME cursor position. - [b]Note:[/b] This method is implemented on macOS. - - - - - - - Returns the IME intermediate composition string. - [constant MainLoop.NOTIFICATION_OS_IME_UPDATE] is sent to the application to notify it of changes to the IME composition string. - [b]Note:[/b] This method is implemented on macOS. - - @@ -252,15 +186,6 @@ See also [member InputEventKey.keycode] and [method InputEventKey.get_keycode_with_modifiers]. - - - - - Returns the current latin keyboard variant as a String. - Possible return values are: [code]"QWERTY"[/code], [code]"AZERTY"[/code], [code]"QZERTY"[/code], [code]"DVORAK"[/code], [code]"NEO"[/code], [code]"COLEMAK"[/code] or [code]"ERROR"[/code]. - [b]Note:[/b] This method is implemented on Linux, macOS and Windows. Returns [code]"QWERTY"[/code] on unsupported platforms. - - @@ -298,57 +223,6 @@ Returns the number of threads available on the host machine. - - - - - Returns the window size including decorations like window borders. - - - - - - - Returns the number of displays attached to the host machine. - - - - - - - - - Returns the dots per inch density of the specified screen. If [code]screen[/code] is [/code]-1[/code] (the default value), the current screen will be used. - On Android devices, the actual screen densities are grouped into six generalized densities: - [codeblock] - ldpi - 120 dpi - mdpi - 160 dpi - hdpi - 240 dpi - xhdpi - 320 dpi - xxhdpi - 480 dpi - xxxhdpi - 640 dpi - [/codeblock] - [b]Note:[/b] This method is implemented on Android, Linux, macOS and Windows. Returns [code]72[/code] on unsupported platforms. - - - - - - - - - Returns the position of the specified screen by index. If [code]screen[/code] is [/code]-1[/code] (the default value), the current screen will be used. - - - - - - - - - Returns the dimensions in pixels of the specified screen. If [code]screen[/code] is [/code]-1[/code] (the default value), the current screen will be used. - - @@ -461,84 +335,6 @@ If the project name is empty, [code]user://[/code] falls back to [code]res://[/code]. - - - - - Returns the number of video drivers supported on the current platform. - - - - - - - - - Returns the name of the video driver matching the given [code]driver[/code] index. This index is a value from [enum VideoDriver], and you can use [method get_current_video_driver] to get the current backend's index. - - - - - - - Returns the on-screen keyboard's height in pixels. Returns 0 if there is no keyboard or if it is currently hidden. - - - - - - - Returns unobscured area of the window where interactive controls should be rendered. - - - - - - - - - - - - - - - Add a new item with text "label" to global menu. Use "_dock" menu to add item to the macOS dock icon menu. - [b]Note:[/b] This method is implemented on macOS. - - - - - - - - - Add a separator between items. Separators also occupy an index. - [b]Note:[/b] This method is implemented on macOS. - - - - - - - - - Clear the global menu, in effect removing all items. - [b]Note:[/b] This method is implemented on macOS. - - - - - - - - - - - Removes the item at index "idx" from the global menu. Note that the indexes of items after the removed item are going to be shifted by one. - [b]Note:[/b] This method is implemented on macOS. - - @@ -558,27 +354,6 @@ [b]Note:[/b] Tag names are case-sensitive. - - - - - Returns [code]true[/code] if the device has a touchscreen or emulates one. - - - - - - - Returns [code]true[/code] if the platform has a virtual keyboard, [code]false[/code] otherwise. - - - - - - - Hides the virtual keyboard if it is shown, does nothing otherwise. - - @@ -597,13 +372,6 @@ Returns [code]true[/code] if the input keycode corresponds to a Unicode character. - - - - - Returns [code]true[/code] if the [b]OK[/b] button should appear on the left and [b]Cancel[/b] on the right. - - @@ -618,21 +386,6 @@ If [code]true[/code], the [code]user://[/code] file system is persistent, so that its state is the same after a player quits and starts the game again. Relevant to the HTML5 platform, where this persistence may be unavailable. - - - - - Returns [code]true[/code] if the window should always be on top of other windows. - - - - - - - Returns [code]true[/code] if the window is currently focused. - [b]Note:[/b] Only implemented on desktop platforms. On other platforms, it will always return [code]true[/code]. - - @@ -644,62 +397,6 @@ [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows. - - - - - Moves the window to the front. - [b]Note:[/b] This method is implemented on Linux, macOS and Windows. - - - - - - - Returns [code]true[/code] if native video is playing. - [b]Note:[/b] This method is implemented on Android and iOS. - - - - - - - Pauses native video playback. - [b]Note:[/b] This method is implemented on Android and iOS. - - - - - - - - - - - - - - - Plays native video from the specified path, at the given volume and with audio and subtitle tracks. - [b]Note:[/b] This method is implemented on Android and iOS, and the current Android implementation does not support the [code]volume[/code], [code]audio_track[/code] and [code]subtitle_track[/code] options. - - - - - - - Stops native video playback. - [b]Note:[/b] This method is implemented on Android and iOS. - - - - - - - Resumes native video playback. - [b]Note:[/b] This method is implemented on Android and iOS. - - @@ -742,14 +439,6 @@ Shows all resources currently used by the game. - - - - - Request the user attention to the window. It'll flash the taskbar button on Windows or bounce the dock icon on OSX. - [b]Note:[/b] This method is implemented on Linux, macOS and Windows. - - @@ -767,51 +456,6 @@ [b]Note:[/b] This method is implemented on Android. - - - - - - - Sets the game's icon using an [Image] resource. - The same image is used for window caption, taskbar/dock and window selection dialog. Image is scaled as needed. - [b]Note:[/b] This method is implemented on HTML5, Linux, macOS and Windows. - - - - - - - - - Sets whether IME input mode should be enabled. - If active IME handles key events before the application and creates an composition string and suggestion list. - Application can retrieve the composition status by using [method get_ime_selection] and [method get_ime_text] functions. - Completed composition string is committed when input is finished. - [b]Note:[/b] This method is implemented on Linux, macOS and Windows. - - - - - - - - - Sets position of IME suggestion list popup (in window coordinates). - [b]Note:[/b] This method is implemented on Linux, macOS and Windows. - - - - - - - - - Sets the game's icon using a multi-size platform-specific icon file ([code]*.ico[/code] on Windows and [code]*.icns[/code] on macOS). - Appropriate size sub-icons are used for window caption, taskbar/dock and window selection dialog. - [b]Note:[/b] This method is implemented on macOS and Windows. - - @@ -830,27 +474,6 @@ Enables backup saves if [code]enabled[/code] is [code]true[/code]. - - - - - - - Sets whether the window should always be on top. - [b]Note:[/b] This method is implemented on Linux, macOS and Windows. - - - - - - - - - Sets the window title to the specified string. - [b]Note:[/b] This should be used sporadically. Don't set this every frame, as that will negatively affect performance on some window managers. - [b]Note:[/b] This method is implemented on HTML5, Linux, macOS and Windows. - - @@ -864,82 +487,18 @@ [b]Note:[/b] This method is implemented on Android, iOS, HTML5, Linux, macOS and Windows. - - - - - - - Shows the virtual keyboard if the platform has one. The [code]existing_text[/code] parameter is useful for implementing your own LineEdit, as it tells the virtual keyboard what text has already been typed (the virtual keyboard uses it for auto-correct and predictions). - [b]Note:[/b] This method is implemented on Android, iOS and UWP. - - - - The clipboard from the host OS. Might be unavailable on some platforms. - - - The current screen index (starting from 0). - The exit code passed to the OS when the main loop exits. By convention, an exit code of [code]0[/code] indicates success whereas a non-zero exit code indicates an error. For portability reasons, the exit code should be set between 0 and 125 (inclusive). [b]Note:[/b] This value will be ignored if using [method SceneTree.quit] with an [code]exit_code[/code] argument passed. - - If [code]true[/code], the engine tries to keep the screen on while the game is running. Useful on mobile. - If [code]true[/code], the engine optimizes for low processor usage by only refreshing the screen if needed. Can improve battery consumption on mobile. The amount of sleeping between frames when the low-processor usage mode is enabled (in microseconds). Higher values will result in lower CPU usage. - - The maximum size of the window (without counting window manager decorations). Does not affect fullscreen mode. Set to [code](0, 0)[/code] to reset to the system default value. - - - The minimum size of the window (without counting window manager decorations). Does not affect fullscreen mode. Set to [code](0, 0)[/code] to reset to the system default value. - - - The current screen orientation. - - - If [code]true[/code], vertical synchronization (Vsync) is enabled. - - - If [code]true[/code] and [code]vsync_enabled[/code] is true, the operating system's window compositor will be used for vsync when the compositor is enabled and the game is in windowed mode. - [b]Note:[/b] This option is experimental and meant to alleviate stutter experienced by some users. However, some users have experienced a Vsync framerate halving (e.g. from 60 FPS to 30 FPS) when using it. - [b]Note:[/b] This property is only implemented on Windows. - - - If [code]true[/code], removes the window frame. - [b]Note:[/b] Setting [code]window_borderless[/code] to [code]false[/code] disables per-pixel transparency. - - - If [code]true[/code], the window is fullscreen. - - - If [code]true[/code], the window is maximized. - - - If [code]true[/code], the window is minimized. - - - If [code]true[/code], the window background is transparent and window frame is removed. - Use [code]get_tree().get_root().set_transparent_background(true)[/code] to disable main viewport background rendering. - [b]Note:[/b] This property has no effect if [b]Project > Project Settings > Display > Window > Per-pixel transparency > Allowed[/b] setting is disabled. - [b]Note:[/b] This property is implemented on HTML5, Linux, macOS and Windows. - - - The window position relative to the screen, the origin is the top left corner, +Y axis goes to the bottom and +X axis goes to the right. - - - If [code]true[/code], the window is resizable by the user. - - - The size of the window (without counting window manager decorations). - @@ -1005,27 +564,6 @@ December. - - Landscape screen orientation. - - - Portrait screen orientation. - - - Reverse landscape screen orientation. - - - Reverse portrait screen orientation. - - - Uses landscape or reverse landscape based on the hardware sensor. - - - Uses portrait or reverse portrait based on the hardware sensor. - - - Uses most suitable orientation based on the hardware sensor. - Desktop directory path. diff --git a/doc/classes/Panel.xml b/doc/classes/Panel.xml index a3f6a0be8f9..7285bc9e2ea 100644 --- a/doc/classes/Panel.xml +++ b/doc/classes/Panel.xml @@ -10,11 +10,21 @@ + + + + + + + + The style of this [Panel]. + + diff --git a/doc/classes/Popup.xml b/doc/classes/Popup.xml index 483e262f60e..6f77f3371d1 100644 --- a/doc/classes/Popup.xml +++ b/doc/classes/Popup.xml @@ -1,81 +1,23 @@ - + Base container control for popups and dialogs. - 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. - - - - - - - Popup (show the control in modal form). - - - - - - - - - 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]. - - - - - - - - - - - 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]. - - - - - - - - - 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]. - - - - - - - - - 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. - - - - - - - Shrink popup to keep to the minimum size of content. - - - - 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. - + + + + - - - 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. - - Emitted when a popup is hidden. @@ -83,11 +25,5 @@ - - Notification sent right after the popup is shown. - - - Notification sent right after the popup is hidden. - diff --git a/doc/classes/PopupDialog.xml b/doc/classes/PopupDialog.xml deleted file mode 100644 index a8fd9c1b7d4..00000000000 --- a/doc/classes/PopupDialog.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - Base class for popup dialogs. - - - PopupDialog is a base class for popup dialogs, along with [WindowDialog]. - - - - - - - - - - Sets a custom [StyleBox] for the panel of the [PopupDialog]. - - - diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml index 8dda33f624a..569da5c58b2 100644 --- a/doc/classes/PopupMenu.xml +++ b/doc/classes/PopupMenu.xml @@ -330,13 +330,6 @@ Returns the tooltip associated with the specified index index [code]idx[/code]. - - - - - Returns [code]true[/code] if the popup will be hidden when the window loses focus or not. - - @@ -404,15 +397,6 @@ [b]Note:[/b] The indices of items after the removed item will be shifted by one. - - - - - - - Hides the [PopupMenu] when the window loses focus. - - @@ -604,7 +588,6 @@ If [code]true[/code], allows to navigate [PopupMenu] with letter keys. - If [code]true[/code], hides the [PopupMenu] when a checkbox or radio button is selected. diff --git a/doc/classes/PopupPanel.xml b/doc/classes/PopupPanel.xml index 2e62d09f8f3..72045c5559b 100644 --- a/doc/classes/PopupPanel.xml +++ b/doc/classes/PopupPanel.xml @@ -4,7 +4,7 @@ Class for displaying popups with a panel background. - 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]. diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 121e55c87ee..46f6fd22847 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -202,7 +202,7 @@ Icon used for the project, set when project loads. Exporters will also use this icon when possible. - 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]. 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]. - 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]. If [code]true[/code], disables printing to standard error in an exported build. @@ -426,12 +426,6 @@ If [code]true[/code], the home indicator is hidden automatically. This only affects iOS devices without a physical home button. - - 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. - - - Sets the window background to transparent when it starts. - Force the window to be always on top. @@ -1002,7 +996,9 @@ 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. @@ -1027,6 +1023,10 @@ + + + + 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]. diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index 7127ba8b717..965d6bf175b 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -763,8 +763,6 @@ - - @@ -2812,7 +2810,7 @@ - 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. - - - - - - - Detaches the viewport from the screen. - - @@ -3378,7 +3367,9 @@ Update the viewport whenever it is visible. - + + + Always update the viewport. diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml index e6778013cf0..00ca5c6e9f1 100644 --- a/doc/classes/SceneTree.xml +++ b/doc/classes/SceneTree.xml @@ -135,13 +135,6 @@ Returns [code]true[/code] if there is a [member network_peer] set. - - - - - Returns [code]true[/code] if the most recent [InputEvent] was marked as handled with [method set_input_as_handled]. - - @@ -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]. - - - - - Marks the most recent [InputEvent] as handled. - - @@ -251,22 +237,7 @@ 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]. - - - - - - - - - - - - - - - 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]. @@ -301,11 +272,8 @@ If [code]true[/code], the [SceneTree]'s [member network_peer] refuses new incoming connections. - - The [SceneTree]'s root [Viewport]. - - - If [code]true[/code], font oversampling is used. + + The [SceneTree]'s root [Window]. @@ -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. - - - - - - - Emitted whenever global menu item is clicked. - - 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]. - - - Emitted when the screen resolution (fullscreen) or window size (windowed) changes. - - Emitted whenever this [SceneTree]'s [member network_peer] disconnected from server. Only emitted on clients. @@ -418,29 +372,5 @@ Call a group only once even if the call is executed many times. - - No stretching. - - - Render stretching in higher resolution (interpolated). - - - Keep the specified display resolution. No interpolation. Content may appear pixelated. - - - Fill the window with the content stretched to cover excessive space. Content may appear stretched. - - - Retain the same aspect ratio by padding with black bars on either axis. This prevents distortion. - - - Expand vertically. Left/right black bars may appear if the window is too wide. - - - Expand horizontally. Top/bottom black bars may appear if the window is too tall. - - - Expand in both directions, retaining the same aspect ratio. This prevents distortion while avoiding black bars. - diff --git a/doc/classes/ScriptCreateDialog.xml b/doc/classes/ScriptCreateDialog.xml index 9f16a6ed46e..aa60ecb12b3 100644 --- a/doc/classes/ScriptCreateDialog.xml +++ b/doc/classes/ScriptCreateDialog.xml @@ -4,7 +4,7 @@ The Editor's popup dialog for creating new [Script] files. - 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 @@ - - - - + diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index dd0b17d0844..517eb3b24ce 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -44,13 +44,6 @@ Returns the total transform of the viewport. - - - - - Returns the topmost modal in the stack. - - @@ -76,13 +69,6 @@ Returns the [enum ShadowAtlasQuadrantSubdiv] of the specified quadrant. - - - - - Returns the size override set with [method set_size_override]. - - @@ -116,13 +102,6 @@ Returns the drag data from the GUI, that was previously returned by [method Control.get_drag_data]. - - - - - Returns [code]true[/code] if there are visible modals on-screen. - - @@ -133,8 +112,24 @@ - + + + + + + + + + + + + + + + + + @@ -144,22 +139,6 @@ - - - - - Returns [code]true[/code] if the size override is enabled. See [method set_size_override]. - - - - - - - - - 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. - - @@ -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. - - - - - - - - - - - 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. - - - + + + @@ -217,9 +185,6 @@ - - If [code]true[/code], the viewport will be used in AR/VR process. - If [code]true[/code], the viewport will process 2D audio streams. @@ -242,6 +207,8 @@ If [code]true[/code], the viewport will not receive input event. + + If [code]true[/code], the GUI controls on the viewport will lay pixel perfectly. @@ -256,15 +223,6 @@ If [code]true[/code], the objects rendered by viewport become subjects of mouse picking process. - - 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]. - - - The clear mode when viewport used as a render target. - - - The update mode when viewport used as a render target. - The subdivision amount of the first quadrant on the shadow atlas. @@ -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. - - The width and height of viewport. - - - If [code]true[/code], the size override affects stretch as well. - If [code]true[/code], the viewport should render its background as transparent. @@ -307,23 +259,11 @@ - 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. - - Do not update the render target. - - - Update the render target once, then switch to [constant UPDATE_DISABLED]. - - - Update the render target only when it is visible. This is the default value. - - - Always update the render target. - This quadrant will not be used. @@ -410,15 +350,6 @@ Use 16x Multisample Antialiasing. Likely unsupported on medium and low-end hardware. - - Always clear the render target before drawing. - - - Never clear the render target. - - - Clear the render target next frame, then switch to [constant CLEAR_MODE_NEVER]. - diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml new file mode 100644 index 00000000000..e1a0f1f22a4 --- /dev/null +++ b/doc/classes/Window.xml @@ -0,0 +1,419 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/classes/WindowDialog.xml b/doc/classes/WindowDialog.xml deleted file mode 100644 index 8b6bf005086..00000000000 --- a/doc/classes/WindowDialog.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - Base class for window dialogs. - - - 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. - - - - - - - - - Returns the close [TextureButton]. - - - - - - If [code]true[/code], the user can resize the window. - - - The text displayed in the window's title bar. - - - - - - - The icon for the close button. - - - The horizontal offset of the close button. - - - The icon used for the close button when it's hovered with the mouse cursor. - - - The vertical offset of the close button. - - - The style for both the content background of the [WindowDialog] and the title bar. - - - The thickness of the border that can be dragged when scaling the window (if [member resizable] is enabled). - - - The color of the title text. - - - The font used to draw the title. - - - The vertical offset of the title text. - - - diff --git a/drivers/dummy/rasterizer_dummy.h b/drivers/dummy/rasterizer_dummy.h index a5034925957..338e4b85019 100644 --- a/drivers/dummy/rasterizer_dummy.h +++ b/drivers/dummy/rasterizer_dummy.h @@ -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) {} diff --git a/scene/gui/panel.cpp b/scene/gui/panel.cpp index ae51463a154..a17d0eb9c66 100644 --- a/scene/gui/panel.cpp +++ b/scene/gui/panel.cpp @@ -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); diff --git a/scene/gui/panel.h b/scene/gui/panel.h index 739c64c0a6d..75e266b6a61 100644 --- a/scene/gui/panel.h +++ b/scene/gui/panel.h @@ -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 diff --git a/scene/main/window.h b/scene/main/window.h index be07762f20a..adaa5ca3be2 100644 --- a/scene/main/window.h +++ b/scene/main/window.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); diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp index a960efb2726..0bad644b95a 100644 --- a/servers/rendering_server.cpp +++ b/servers/rendering_server.cpp @@ -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);