
Publisher
dmgsoftware
Dark Mode Signal
Provides a global DarkMode singleton node which generates a signal when dark mode is turned on or off. Dark mode is checked every 1 second by default. Connect to the signal as follows: DarkMode.dark_mode_changed.connect(func(is_dark_mode): print("Is dark mode: ", is_dark_mode) ) Provides an alternative to DisplayServer.is_dark_mode() with: DarkMode.is_dark_mode() Polling can be updated either via inspecting the global DarkMode node or: DarkMode.polling_interval = 2.0 # check every 2 seconds
This plugin has been mirrored from the Godot Asset Library.
The plugin author is in no way affiliated with Gadget.
If you are the author of this plugin and would like this mirror removed, please contact support@gadgetgodot.com.
Dark Mode Signal
Provides a global DarkMode node which generates a signal when dark mode is turned on or off. Dark mode is checked every 1 second by default.
Connect to Signal
DarkMode.dark_mode_changed.connect(func(is_dark_mode):
print("Is dark mode: ", is_dark_mode)
)
Is dark mode enabled?
Also provides an alternative to DisplayServer.is_dark_mode() with:
DarkMode.is_dark_mode()
Altering polling interval
If you would prefer to poll for a change in dark mode more or less often than every 1 second:
# once every 2 seconds
DarkMode.polling_interval = 2.0
Alternatively, the interval may be changed via the GUI Inspector on the global DarkMode node.