diff options
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/shader_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/spatial_editor_plugin.cpp | 18 |
2 files changed, 20 insertions, 0 deletions
diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp index c0b5053f9d..c24a666c55 100644 --- a/editor/plugins/shader_editor_plugin.cpp +++ b/editor/plugins/shader_editor_plugin.cpp @@ -379,6 +379,8 @@ void ShaderEditor::_editor_settings_changed() { shader_editor->get_text_edit()->cursor_set_block_mode(EditorSettings::get_singleton()->get("text_editor/cursor/block_caret")); shader_editor->get_text_edit()->set_smooth_scroll_enabled(EditorSettings::get_singleton()->get("text_editor/navigation/smooth_scrolling")); shader_editor->get_text_edit()->set_v_scroll_speed(EditorSettings::get_singleton()->get("text_editor/navigation/v_scroll_speed")); + shader_editor->get_text_edit()->set_draw_minimap(EditorSettings::get_singleton()->get("text_editor/navigation/show_minimap")); + shader_editor->get_text_edit()->set_minimap_width((int)EditorSettings::get_singleton()->get("text_editor/navigation/minimap_width") * EDSCALE); } void ShaderEditor::_bind_methods() { diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index 31dce720db..bf87bfc14d 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -3613,6 +3613,24 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed view_menu->set_disable_shortcuts(true); + if (OS::get_singleton()->get_current_video_driver() == OS::VIDEO_DRIVER_GLES2) { + // Alternate display modes only work when using the GLES3 renderer; make this explicit. + const int normal_idx = view_menu->get_popup()->get_item_index(VIEW_DISPLAY_NORMAL); + const int wireframe_idx = view_menu->get_popup()->get_item_index(VIEW_DISPLAY_WIREFRAME); + const int overdraw_idx = view_menu->get_popup()->get_item_index(VIEW_DISPLAY_OVERDRAW); + const int shadeless_idx = view_menu->get_popup()->get_item_index(VIEW_DISPLAY_SHADELESS); + const String unsupported_tooltip = TTR("Not available when using the GLES2 renderer."); + + view_menu->get_popup()->set_item_disabled(normal_idx, true); + view_menu->get_popup()->set_item_tooltip(normal_idx, unsupported_tooltip); + view_menu->get_popup()->set_item_disabled(wireframe_idx, true); + view_menu->get_popup()->set_item_tooltip(wireframe_idx, unsupported_tooltip); + view_menu->get_popup()->set_item_disabled(overdraw_idx, true); + view_menu->get_popup()->set_item_tooltip(overdraw_idx, unsupported_tooltip); + view_menu->get_popup()->set_item_disabled(shadeless_idx, true); + view_menu->get_popup()->set_item_tooltip(shadeless_idx, unsupported_tooltip); + } + ED_SHORTCUT("spatial_editor/freelook_left", TTR("Freelook Left"), KEY_A); ED_SHORTCUT("spatial_editor/freelook_right", TTR("Freelook Right"), KEY_D); ED_SHORTCUT("spatial_editor/freelook_forward", TTR("Freelook Forward"), KEY_W); |