From 62840e8517b1dd2a71d30fb84c77f0ce4be7d577 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sun, 3 Sep 2023 13:15:23 +0200 Subject: [PATCH] Use an icon for the quick prop conversion buttons instead of text. --- modules/props/editor/prop_editor_plugin.cpp | 4 +++- modules/props_2d/editor/prop_2d_editor_plugin.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/props/editor/prop_editor_plugin.cpp b/modules/props/editor/prop_editor_plugin.cpp index b6cef5132..6dea9ce2f 100644 --- a/modules/props/editor/prop_editor_plugin.cpp +++ b/modules/props/editor/prop_editor_plugin.cpp @@ -110,7 +110,9 @@ PropEditorPlugin::PropEditorPlugin(EditorNode *p_node) { b->set_flat(true); b->connect("pressed", this, "_quick_convert_button_pressed"); - b->set_text("To Prop"); + b->set_icon(editor->get_scene_tree_dock()->get_theme_icon("AssetLib", "EditorIcons")); + //b->set_text("To Prop"); + b->set_tooltip(TTR("To Prop") + "\n" + TTR("Quick convert this scene to a Prop Resource.")); b->set_shortcut(ED_SHORTCUT("spatial_editor/quick_prop_convert", "Quick convert scene to PropData.", KEY_MASK_ALT + KEY_U)); add_control_to_container(EditorPlugin::CONTAINER_SPATIAL_EDITOR_MENU, bc); diff --git a/modules/props_2d/editor/prop_2d_editor_plugin.cpp b/modules/props_2d/editor/prop_2d_editor_plugin.cpp index 64e7d6c25..be22aa616 100644 --- a/modules/props_2d/editor/prop_2d_editor_plugin.cpp +++ b/modules/props_2d/editor/prop_2d_editor_plugin.cpp @@ -108,7 +108,9 @@ Prop2DEditorPlugin::Prop2DEditorPlugin(EditorNode *p_node) { b->set_flat(true); b->connect("pressed", this, "_quick_convert_button_pressed"); - b->set_text("To Prop2D"); + b->set_icon(editor->get_scene_tree_dock()->get_theme_icon("AssetLib", "EditorIcons")); + //b->set_text("To Prop2D"); + b->set_tooltip(TTR("To Prop") + "\n" + TTR("Quick convert this scene to a Prop 2D Resource.")); b->set_shortcut(ED_SHORTCUT("spatial_editor/quick_prop_convert", "Quick convert scene to Prop2DData.", KEY_MASK_ALT + KEY_U)); add_control_to_container(EditorPlugin::CONTAINER_CANVAS_EDITOR_MENU, bc);