Improve "Add" button consistency in Project Settings

* Adds an icon to all the input-adjacent add/remove buttons
 * Adds a separator next to the action map "add" button
 * Changes the Shader Globals editor to be consistent with the others
 * Adds a clear button to the shader global name input
This commit is contained in:
Christian Kaiser
2024-01-11 17:13:23 -03:00
parent 12ee58d8bc
commit 1910f91f17
6 changed files with 41 additions and 6 deletions

View File

@ -36,6 +36,7 @@
#include "editor/event_listener_line_edit.h"
#include "editor/input_event_configuration_dialog.h"
#include "scene/gui/check_button.h"
#include "scene/gui/separator.h"
#include "scene/gui/tree.h"
#include "scene/scene_string_names.h"
@ -357,6 +358,7 @@ void ActionMapEditor::_notification(int p_what) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
action_list_search->set_right_icon(get_editor_theme_icon(SNAME("Search")));
add_button->set_icon(get_editor_theme_icon(SNAME("Add")));
if (!actions_cache.is_empty()) {
update_action_list();
}
@ -570,6 +572,8 @@ ActionMapEditor::ActionMapEditor() {
// Disable the button and set its tooltip.
_add_edit_text_changed(add_edit->get_text());
add_hbox->add_child(memnew(VSeparator));
show_builtin_actions_checkbutton = memnew(CheckButton);
show_builtin_actions_checkbutton->set_text(TTR("Show Built-in Actions"));
show_builtin_actions_checkbutton->connect("toggled", callable_mp(this, &ActionMapEditor::set_show_builtin_actions));