1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-14 13:41:12 +00:00

Add method to get "base" system UI color (macOS/Windows) and system theme change callback.

This commit is contained in:
bruvzg
2024-01-19 20:46:26 +02:00
parent e92d55bbf4
commit ee53ae28df
24 changed files with 282 additions and 22 deletions

View File

@@ -127,6 +127,16 @@ bool DisplayServerAndroid::is_dark_mode() const {
return godot_java->is_dark_mode();
}
void DisplayServerAndroid::set_system_theme_change_callback(const Callable &p_callable) {
system_theme_changed = p_callable;
}
void DisplayServerAndroid::emit_system_theme_changed() {
if (system_theme_changed.is_valid()) {
system_theme_changed.call_deferred();
}
}
void DisplayServerAndroid::clipboard_set(const String &p_text) {
GodotJavaWrapper *godot_java = OS_Android::get_singleton()->get_godot_java();
ERR_FAIL_NULL(godot_java);