MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / _renderer_selected

Method _renderer_selected

editor/editor_node.cpp:7156–7172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7154}
7155
7156void EditorNode::_renderer_selected(int p_which) {
7157 String rendering_method = renderer->get_item_metadata(p_which);
7158
7159 String current_renderer = GLOBAL_GET("rendering/renderer/rendering_method");
7160
7161 if (rendering_method == current_renderer) {
7162 return;
7163 }
7164
7165 renderer_request = rendering_method;
7166 video_restart_dialog->set_text(
7167 vformat(TTR("Changing the renderer requires restarting the editor.\n\nChoosing Save & Restart will change the rendering method to:\n- Desktop platforms: %s\n- Mobile platforms: %s\n- Web platform: gl_compatibility"),
7168 renderer_request, renderer_request.replace("forward_plus", "mobile")));
7169 video_restart_dialog->popup_centered();
7170 renderer->select(renderer_current);
7171 _update_renderer_color();
7172}
7173
7174void EditorNode::_add_renderer_entry(const String &p_renderer_name, bool p_mark_overridden) {
7175 String item_text;

Callers

nothing calls this directly

Calls 7

vformatFunction · 0.85
TTRFunction · 0.85
popup_centeredMethod · 0.80
get_item_metadataMethod · 0.45
set_textMethod · 0.45
replaceMethod · 0.45
selectMethod · 0.45

Tested by

no test coverage detected