diff options
-rw-r--r-- | core/os/os.h | 2 | ||||
-rw-r--r-- | doc/classes/OS.xml | 4 | ||||
-rw-r--r-- | doc/classes/ProjectSettings.xml | 5 | ||||
-rw-r--r-- | main/main.cpp | 1 | ||||
-rw-r--r-- | platform/osx/os_osx.mm | 2 | ||||
-rw-r--r-- | platform/windows/os_windows.cpp | 2 | ||||
-rw-r--r-- | platform/x11/os_x11.cpp | 2 |
7 files changed, 9 insertions, 9 deletions
diff --git a/core/os/os.h b/core/os/os.h index 4f6a539e78..b128e6424c 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -104,7 +104,6 @@ public: bool maximized; bool always_on_top; bool use_vsync; - bool layered_splash; bool layered; float get_aspect() const { return (float)width / (float)height; } VideoMode(int p_width = 1024, int p_height = 600, bool p_fullscreen = false, bool p_resizable = true, bool p_borderless_window = false, bool p_maximized = false, bool p_always_on_top = false, bool p_use_vsync = false) { @@ -117,7 +116,6 @@ public: always_on_top = p_always_on_top; use_vsync = p_use_vsync; layered = false; - layered_splash = false; } }; diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index dd0fcd63e7..81beca8b24 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -813,6 +813,7 @@ </member> <member name="window_borderless" type="bool" setter="set_borderless_window" getter="get_borderless_window"> If [code]true[/code], removes the window frame. + Note: Setting [code]window_borderless[/code] to [code]false[/code] disables per-pixel transparency. </member> <member name="window_fullscreen" type="bool" setter="set_window_fullscreen" getter="is_window_fullscreen"> If [code]true[/code], the window is fullscreen. @@ -824,6 +825,9 @@ If [code]true[/code], the window is minimized. </member> <member name="window_per_pixel_transparency_enabled" type="bool" setter="set_window_per_pixel_transparency_enabled" getter="get_window_per_pixel_transparency_enabled"> + 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. + Note: This property has no effect if "Project > Project Settings > Display > Window > Per-pixel transparency > Allowed" setting is disabled. </member> <member name="window_position" type="Vector2" setter="set_window_position" getter="get_window_position"> 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. diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 5bcd39a8d6..9d2bbbead6 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -374,11 +374,10 @@ Default orientation on mobile devices. </member> <member name="display/window/per_pixel_transparency/allowed" type="bool" setter="" getter=""> - If [code]true[/code], allows per-pixel transparency in a desktop window. This affects performance if not needed, so leave it on [code]false[/code] unless you need it. + 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=""> - </member> - <member name="display/window/per_pixel_transparency/splash" type="bool" setter="" getter=""> + Set the window background to transparent when it starts. </member> <member name="display/window/size/always_on_top" type="bool" setter="" getter=""> Force the window to be always on top. diff --git a/main/main.cpp b/main/main.cpp index a01d1abe43..87614e8d72 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -939,7 +939,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph OS::get_singleton()->_allow_layered = GLOBAL_DEF("display/window/per_pixel_transparency/allowed", false); video_mode.layered = GLOBAL_DEF("display/window/per_pixel_transparency/enabled", false); - video_mode.layered_splash = GLOBAL_DEF("display/window/per_pixel_transparency/splash", false); GLOBAL_DEF("rendering/quality/intended_usage/framebuffer_allocation", 2); GLOBAL_DEF("rendering/quality/intended_usage/framebuffer_allocation.mobile", 3); diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index 113c6636f0..6326c89c37 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -1507,7 +1507,7 @@ Error OS_OSX::initialize(const VideoMode &p_desired, int p_video_driver, int p_a restore_rect = Rect2(get_window_position(), get_window_size()); - if (p_desired.layered_splash) { + if (p_desired.layered) { set_window_per_pixel_transparency_enabled(true); } return OK; diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 6df2ad4821..4cd637a4b2 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -1381,7 +1381,7 @@ Error OS_Windows::initialize(const VideoMode &p_desired, int p_video_driver, int SetFocus(hWnd); // Sets Keyboard Focus To } - if (p_desired.layered_splash) { + if (p_desired.layered) { set_window_per_pixel_transparency_enabled(true); } diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index 311b42be22..9044fa6d2c 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -593,7 +593,7 @@ Error OS_X11::initialize(const VideoMode &p_desired, int p_video_driver, int p_a power_manager = memnew(PowerX11); - if (p_desired.layered_splash) { + if (p_desired.layered) { set_window_per_pixel_transparency_enabled(true); } |