You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Disable multi-window buttons instead of hiding them when support is unavailable
This is more explicit as for why this functionality isn't available depending on editor settings and current platform. This also exposes a `EditorInterface.is_multi_window_enabled()` method so that editor plugins can easily query whether the editor is able and expected to create multiple windows.
This commit is contained in:
@@ -235,6 +235,10 @@ bool EditorInterface::is_distraction_free_mode_enabled() const {
|
||||
return EditorNode::get_singleton()->is_distraction_free_mode_enabled();
|
||||
}
|
||||
|
||||
bool EditorInterface::is_multi_window_enabled() const {
|
||||
return EditorNode::get_singleton()->is_multi_window_enabled();
|
||||
}
|
||||
|
||||
float EditorInterface::get_editor_scale() const {
|
||||
return EDSCALE;
|
||||
}
|
||||
@@ -445,6 +449,7 @@ void EditorInterface::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_main_screen_editor", "name"), &EditorInterface::set_main_screen_editor);
|
||||
ClassDB::bind_method(D_METHOD("set_distraction_free_mode", "enter"), &EditorInterface::set_distraction_free_mode);
|
||||
ClassDB::bind_method(D_METHOD("is_distraction_free_mode_enabled"), &EditorInterface::is_distraction_free_mode_enabled);
|
||||
ClassDB::bind_method(D_METHOD("is_multi_window_enabled"), &EditorInterface::is_multi_window_enabled);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("get_editor_scale"), &EditorInterface::get_editor_scale);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user