diff options
-rw-r--r-- | core/bind/core_bind.cpp | 20 | ||||
-rw-r--r-- | doc/classes/OS.xml | 6 |
2 files changed, 23 insertions, 3 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 44573a0d97..da7b15da94 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -1317,6 +1317,26 @@ void _OS::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "window_position"), "set_window_position", "get_window_position"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "window_size"), "set_window_size", "get_window_size"); + // Those default values need to be specified for the docs generator, + // to avoid using values from the documentation writer's own OS instance. + ADD_PROPERTY_DEFAULT("clipboard", ""); + ADD_PROPERTY_DEFAULT("current_screen", 0); + ADD_PROPERTY_DEFAULT("exit_code", 0); + ADD_PROPERTY_DEFAULT("vsync_enabled", true); + ADD_PROPERTY_DEFAULT("low_processor_usage_mode", false); + ADD_PROPERTY_DEFAULT("keep_screen_on", true); + ADD_PROPERTY_DEFAULT("min_window_size", Vector2()); + ADD_PROPERTY_DEFAULT("max_window_size", Vector2()); + ADD_PROPERTY_DEFAULT("screen_orientation", 0); + ADD_PROPERTY_DEFAULT("window_borderless", false); + ADD_PROPERTY_DEFAULT("window_per_pixel_transparency_enabled", false); + ADD_PROPERTY_DEFAULT("window_fullscreen", false); + ADD_PROPERTY_DEFAULT("window_maximized", false); + ADD_PROPERTY_DEFAULT("window_minimized", false); + ADD_PROPERTY_DEFAULT("window_resizable", true); + ADD_PROPERTY_DEFAULT("window_position", Vector2()); + ADD_PROPERTY_DEFAULT("window_size", Vector2()); + BIND_ENUM_CONSTANT(VIDEO_DRIVER_GLES2); BIND_ENUM_CONSTANT(VIDEO_DRIVER_GLES3); diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 9854c2dead..d73c85a6d9 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -800,7 +800,7 @@ </method> </methods> <members> - <member name="clipboard" type="String" setter="set_clipboard" getter="get_clipboard" default=""an editor if it were""> + <member name="clipboard" type="String" setter="set_clipboard" getter="get_clipboard" default=""""> The clipboard from the host OS. Might be unavailable on some platforms. </member> <member name="current_screen" type="int" setter="set_current_screen" getter="get_current_screen" default="0"> @@ -845,13 +845,13 @@ 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. </member> - <member name="window_position" type="Vector2" setter="set_window_position" getter="get_window_position" default="Vector2( 0, 436 )"> + <member name="window_position" type="Vector2" setter="set_window_position" getter="get_window_position" default="Vector2( 0, 0 )"> 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. </member> <member name="window_resizable" type="bool" setter="set_window_resizable" getter="is_window_resizable" default="true"> If [code]true[/code], the window is resizable by the user. </member> - <member name="window_size" type="Vector2" setter="set_window_size" getter="get_window_size" default="Vector2( 1024, 600 )"> + <member name="window_size" type="Vector2" setter="set_window_size" getter="get_window_size" default="Vector2( 0, 0 )"> The size of the window (without counting window manager decorations). </member> </members> |