From 54863b20e686944651415bf0a6af3ebc2cf9369f Mon Sep 17 00:00:00 2001
From: bruvzg <7645683+bruvzg@users.noreply.github.com>
Date: Tue, 4 Jun 2019 11:21:29 +0300
Subject: Removes redundant "display/window/per_pixel_transparency/splash"
setting, improves per pixel transparency documentation.
---
core/os/os.h | 2 --
doc/classes/OS.xml | 4 ++++
doc/classes/ProjectSettings.xml | 5 ++---
main/main.cpp | 1 -
platform/osx/os_osx.mm | 2 +-
platform/windows/os_windows.cpp | 2 +-
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 @@
If [code]true[/code], removes the window frame.
+ Note: Setting [code]window_borderless[/code] to [code]false[/code] disables per-pixel transparency.
If [code]true[/code], the window is fullscreen.
@@ -824,6 +825,9 @@
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.
+ Note: This property has no effect if "Project > Project Settings > Display > Window > Per-pixel transparency > Allowed" setting is disabled.
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.
- 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.
-
-
+ Set the window background to transparent when it starts.
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);
}
--
cgit v1.2.3