mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +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:
parent
17e7f85c06
commit
04a930d9a6
10 changed files with 81 additions and 30 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue