1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 17:19:50 +00:00

Add setting for Godots low processor usage mode (#1056)

* Add setting for Godots low processor usage mode

* Update name and description of low processor usage mode setting in preferences

* Fix a tiny mistake
This commit is contained in:
Kiisu_Master 2024-07-30 19:02:10 +03:00 committed by GitHub
parent 7d30aed62d
commit f27d152cb3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 23 additions and 0 deletions

View file

@ -475,6 +475,10 @@ var fps_limit := 0:
## Found in Preferences. Affects the per_pixel_transparency project setting. ## Found in Preferences. Affects the per_pixel_transparency project setting.
## If [code]true[/code], it allows for the window to be transparent. ## 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. ## This affects performance, so keep it [code]false[/code] if you don't need it.
var update_continuously := false:
set(value):
update_continuously = value
OS.low_processor_usage_mode = !value
var window_transparency := false: var window_transparency := false:
set(value): set(value):
if value == window_transparency: if value == window_transparency:

View file

@ -175,6 +175,12 @@ var preferences: Array[Preference] = [
"button_pressed", "button_pressed",
true true
), ),
Preference.new(
"update_continuously",
"Performance/PerformanceContainer/UpdateContinuously",
"button_pressed",
false
),
Preference.new( Preference.new(
"window_transparency", "window_transparency",
"Performance/PerformanceContainer/WindowTransparency", "Performance/PerformanceContainer/WindowTransparency",

View file

@ -1058,6 +1058,19 @@ mouse_default_cursor_shape = 2
button_pressed = true button_pressed = true
text = "On" text = "On"
[node name="UpdateContinuouslyLabel" type="Label" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Performance/PerformanceContainer"]
layout_mode = 2
tooltip_text = "If this is toggled on, the application will redraw the screen continuously, even while it's not used. Turning this off helps lower CPU and GPU usage when idle."
mouse_filter = 0
text = "Update Continuously"
[node name="UpdateContinuously" type="CheckBox" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Performance/PerformanceContainer"]
layout_mode = 2
tooltip_text = "If this is toggled on, the application will redraw the screen continuously, even while it's not used. Turning this off helps lower CPU and GPU usage when idle."
mouse_default_cursor_shape = 2
button_pressed = true
text = "On"
[node name="WindowTransparencyLabel" type="Label" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Performance/PerformanceContainer"] [node name="WindowTransparencyLabel" type="Label" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Performance/PerformanceContainer"]
layout_mode = 2 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." tooltip_text = "If enabled, the application window can become transparent. This affects performance, so keep it off if you don't need it."