Skip to content

Commit

Permalink
Merge pull request #22027 from akien-mga/plain-text-gles-toggle
Browse files Browse the repository at this point in the history
Use plain text instead of icons for video driver toggle
  • Loading branch information
akien-mga authored Sep 13, 2018
2 parents bcba5a9 + 399f667 commit 06c8b5a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 144 deletions.
13 changes: 5 additions & 8 deletions editor/editor_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5358,22 +5358,20 @@ EditorNode::EditorNode() {
play_custom_scene_button->set_shortcut(ED_SHORTCUT("editor/play_custom_scene", TTR("Play Custom Scene"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_F5));
#endif

// Toggle for video driver
video_driver = memnew(OptionButton);
video_driver->set_flat(true);
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");
menu_hb->add_child(video_driver);

String video_drivers = ProjectSettings::get_singleton()->get_custom_property_info()["rendering/quality/driver/driver_name"].hint_string;
String current_video_driver = OS::get_singleton()->get_video_driver_name(OS::get_singleton()->get_current_video_driver());
menu_hb->add_child(video_driver);
video_driver_current = 0;
for (int i = 0; i < video_drivers.get_slice_count(","); i++) {
String driver = video_drivers.get_slice(",", i);
if (gui_base->has_icon(driver, "EditorIcons")) {
video_driver->add_icon_item(gui_base->get_icon(driver, "EditorIcons"), "");
} else {
video_driver->add_item(driver);
}

video_driver->add_item(driver);
video_driver->set_item_metadata(i, driver);

if (current_video_driver == driver) {
Expand All @@ -5382,7 +5380,6 @@ EditorNode::EditorNode() {
}
}

video_driver->connect("item_selected", this, "_video_driver_selected");
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"));
Expand Down
69 changes: 0 additions & 69 deletions editor/icons/icon_g_l_e_s_2.svg

This file was deleted.

67 changes: 0 additions & 67 deletions editor/icons/icon_g_l_e_s_3.svg

This file was deleted.

0 comments on commit 06c8b5a

Please sign in to comment.