diff options
author | Juan Linietsky <reduzio@gmail.com> | 2018-09-28 16:40:20 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2018-09-28 16:42:47 -0300 |
commit | f2ed26d71e20b92dbf21693eeea36ccfcc50ced6 (patch) | |
tree | 641b343f7fac36eb4b951c6effb33dbb5a86a51a /editor/editor_node.cpp | |
parent | 40c3c8745df3d08065802762e236beeaa6aa1345 (diff) |
Reflection probe support in GLES2 back-end.
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r-- | editor/editor_node.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 03746fb8b7..330173a8c3 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -4523,6 +4523,16 @@ void EditorNode::_bottom_panel_raise_toggled(bool p_pressed) { } } +void EditorNode::_update_video_driver_color() { + + //todo probably should de-harcode this and add to editor settings + if (video_driver->get_text() == "GLES2") { + video_driver->add_color_override("font_color", Color::hex(0x5586a4ff)); + } else if (video_driver->get_text() == "GLES3") { + video_driver->add_color_override("font_color", Color::hex(0xa5557dff)); + } +} + void EditorNode::_video_driver_selected(int p_which) { String driver = video_driver->get_item_metadata(p_which); @@ -4536,6 +4546,7 @@ void EditorNode::_video_driver_selected(int p_which) { video_driver_request = driver; video_restart_dialog->popup_centered_minsize(); video_driver->select(video_driver_current); + _update_video_driver_color(); } void EditorNode::_bind_methods() { @@ -5398,6 +5409,7 @@ EditorNode::EditorNode() { video_driver->set_focus_mode(Control::FOCUS_NONE); video_driver->set_v_size_flags(Control::SIZE_SHRINK_CENTER); video_driver->connect("item_selected", this, "_video_driver_selected"); + video_driver->add_font_override("font", gui_base->get_font("bold", "EditorFonts")); menu_hb->add_child(video_driver); String video_drivers = ProjectSettings::get_singleton()->get_custom_property_info()["rendering/quality/driver/driver_name"].hint_string; @@ -5414,6 +5426,8 @@ EditorNode::EditorNode() { } } + _update_video_driver_color(); + video_restart_dialog = memnew(ConfirmationDialog); video_restart_dialog->set_text(TTR("Changing the video driver requires restarting the editor.")); video_restart_dialog->get_ok()->set_text(TTR("Save & Restart")); |