mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 17:19:50 +00:00
Expose window transparency as an option in the preferences, keep it disabled by default
I had to disable it, because for some reason having it be enabled by default does not seem to be working. This may be a good idea anyway, as many people will not need this feature, and having this enabled affects performance. This commit also allows for changing project setting related options in the preferences to also work when running Pixelorama inside Godot.
This commit is contained in:
parent
ed072de84e
commit
ffd729486f
|
@ -1462,15 +1462,23 @@ msgstr ""
|
|||
msgid "Set application FPS limit:"
|
||||
msgstr ""
|
||||
|
||||
msgid "Pause application when it loses focus"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sets the limit of the application's frames per second. The lower the number, the lower the CPU usage, but the application gets slower, choppier and unresponsive. 0 means that there is no limit."
|
||||
msgstr ""
|
||||
|
||||
msgid "Pause application when it loses focus"
|
||||
msgstr ""
|
||||
|
||||
msgid "If this is toggled on, when the application's window loses focus, it gets paused. This helps lower CPU usage when idle. The application gets unpaused when the mouse enters the application's window."
|
||||
msgstr ""
|
||||
|
||||
#. An option found in the preferences, under the Performance section.
|
||||
msgid "Enable window transparency"
|
||||
msgstr ""
|
||||
|
||||
#. Found in the preferences, tooltip of the "Enable window transparency" option.
|
||||
msgid "If enabled, the application window can become transparent. This affects performance, so keep it off if you don't need it."
|
||||
msgstr ""
|
||||
|
||||
#. Found in the Preferences, under Drivers. Specifies the renderer/video driver being used.
|
||||
msgid "Renderer:"
|
||||
msgstr ""
|
||||
|
|
|
@ -52,7 +52,6 @@ gdscript/warnings/narrowing_conversion=false
|
|||
|
||||
window/size/viewport_width=1280
|
||||
window/size/viewport_height=720
|
||||
window/per_pixel_transparency/allowed=true
|
||||
window/per_pixel_transparency/allowed.android=false
|
||||
window/per_pixel_transparency/allowed.web=false
|
||||
|
||||
|
|
|
@ -170,9 +170,9 @@ var use_native_file_dialogs := false:
|
|||
## Found in Preferences. If [code]true[/code], subwindows are embedded in the main window.
|
||||
var single_window_mode := true:
|
||||
set(value):
|
||||
single_window_mode = value
|
||||
if OS.has_feature("editor"):
|
||||
if value == single_window_mode:
|
||||
return
|
||||
single_window_mode = value
|
||||
ProjectSettings.set_setting("display/window/subwindows/embed_subwindows", value)
|
||||
ProjectSettings.save_custom(root_directory.path_join(OVERRIDE_FILE))
|
||||
## Found in Preferences. The modulation color (or simply color) of icons.
|
||||
|
@ -356,6 +356,16 @@ var fps_limit := 0:
|
|||
set(value):
|
||||
fps_limit = value
|
||||
Engine.max_fps = fps_limit
|
||||
## Found in Preferences. Affects the per_pixel_transparency project setting.
|
||||
## If [code]true[/code], it allows for the window to be transparent.
|
||||
## This affects performance, so keep it [code]false[/code] if you don't need it.
|
||||
var window_transparency := false:
|
||||
set(value):
|
||||
if value == window_transparency:
|
||||
return
|
||||
window_transparency = value
|
||||
ProjectSettings.set_setting("display/window/per_pixel_transparency/allowed", value)
|
||||
ProjectSettings.save_custom(root_directory.path_join(OVERRIDE_FILE))
|
||||
|
||||
## Found in Preferences. The time (in minutes) after which backup is created (if enabled).
|
||||
var autosave_interval := 1.0:
|
||||
|
@ -374,9 +384,9 @@ var renderer := 0:
|
|||
## Found in Preferences. The index of tablet driver used by Pixelorama.
|
||||
var tablet_driver := 0:
|
||||
set(value):
|
||||
tablet_driver = value
|
||||
if OS.has_feature("editor"):
|
||||
if value == tablet_driver:
|
||||
return
|
||||
tablet_driver = value
|
||||
var tablet_driver_name := DisplayServer.tablet_get_current_driver()
|
||||
ProjectSettings.set_setting("display/window/tablet_driver", tablet_driver_name)
|
||||
ProjectSettings.save_custom(root_directory.path_join(OVERRIDE_FILE))
|
||||
|
@ -553,6 +563,9 @@ func _init() -> void:
|
|||
if ProjectSettings.get_setting("display/window/tablet_driver") == "winink":
|
||||
tablet_driver = 1
|
||||
single_window_mode = ProjectSettings.get_setting("display/window/subwindows/embed_subwindows")
|
||||
window_transparency = ProjectSettings.get_setting(
|
||||
"display/window/per_pixel_transparency/allowed"
|
||||
)
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
|
|
|
@ -101,6 +101,13 @@ var preferences: Array[Preference] = [
|
|||
Preference.new(
|
||||
"pause_when_unfocused", "Performance/PerformanceContainer/PauseAppFocus", "button_pressed"
|
||||
),
|
||||
Preference.new(
|
||||
"window_transparency",
|
||||
"Performance/PerformanceContainer/WindowTransparency",
|
||||
"button_pressed",
|
||||
true,
|
||||
false
|
||||
),
|
||||
# Preference.new(
|
||||
# "renderer", "Drivers/DriversContainer/Renderer", "selected", true, OS.VIDEO_DRIVER_GLES2
|
||||
# ),
|
||||
|
|
|
@ -1054,6 +1054,18 @@ mouse_default_cursor_shape = 2
|
|||
button_pressed = true
|
||||
text = "On"
|
||||
|
||||
[node name="WindowTransparencyLabel" type="Label" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Performance/PerformanceContainer"]
|
||||
layout_mode = 2
|
||||
tooltip_text = "If enabled, the application window can become transparent. This affects performance, so keep it off if you don't need it."
|
||||
mouse_filter = 0
|
||||
text = "Enable window transparency"
|
||||
|
||||
[node name="WindowTransparency" type="CheckBox" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Performance/PerformanceContainer"]
|
||||
layout_mode = 2
|
||||
tooltip_text = "If enabled, the application window can become transparent. This affects performance, so keep it off if you don't need it."
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "On"
|
||||
|
||||
[node name="Drivers" type="VBoxContainer" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
|
|
Loading…
Reference in a new issue