Fix inconsistences in some buttons in the Canvas/Spatial editor menubar
This commit is contained in:
parent
dbaa223297
commit
46d02bade4
7 changed files with 16 additions and 17 deletions
|
@ -108,7 +108,7 @@ void BakedLightmapEditorPlugin::_bind_methods() {
|
||||||
BakedLightmapEditorPlugin::BakedLightmapEditorPlugin(EditorNode *p_node) {
|
BakedLightmapEditorPlugin::BakedLightmapEditorPlugin(EditorNode *p_node) {
|
||||||
|
|
||||||
editor = p_node;
|
editor = p_node;
|
||||||
bake = memnew(Button);
|
bake = memnew(ToolButton);
|
||||||
bake->set_icon(editor->get_gui_base()->get_icon("Bake", "EditorIcons"));
|
bake->set_icon(editor->get_gui_base()->get_icon("Bake", "EditorIcons"));
|
||||||
bake->set_text(TTR("Bake Lightmaps"));
|
bake->set_text(TTR("Bake Lightmaps"));
|
||||||
bake->hide();
|
bake->hide();
|
||||||
|
|
|
@ -42,7 +42,7 @@ class BakedLightmapEditorPlugin : public EditorPlugin {
|
||||||
|
|
||||||
BakedLightmap *lightmap;
|
BakedLightmap *lightmap;
|
||||||
|
|
||||||
Button *bake;
|
ToolButton *bake;
|
||||||
EditorNode *editor;
|
EditorNode *editor;
|
||||||
|
|
||||||
static EditorProgress *tmp_progress;
|
static EditorProgress *tmp_progress;
|
||||||
|
|
|
@ -90,7 +90,7 @@ void GIProbeEditorPlugin::_bind_methods() {
|
||||||
GIProbeEditorPlugin::GIProbeEditorPlugin(EditorNode *p_node) {
|
GIProbeEditorPlugin::GIProbeEditorPlugin(EditorNode *p_node) {
|
||||||
|
|
||||||
editor = p_node;
|
editor = p_node;
|
||||||
bake = memnew(Button);
|
bake = memnew(ToolButton);
|
||||||
bake->set_icon(editor->get_gui_base()->get_icon("Bake", "EditorIcons"));
|
bake->set_icon(editor->get_gui_base()->get_icon("Bake", "EditorIcons"));
|
||||||
bake->set_text(TTR("Bake GI Probe"));
|
bake->set_text(TTR("Bake GI Probe"));
|
||||||
bake->hide();
|
bake->hide();
|
||||||
|
|
|
@ -42,7 +42,7 @@ class GIProbeEditorPlugin : public EditorPlugin {
|
||||||
|
|
||||||
GIProbe *gi_probe;
|
GIProbe *gi_probe;
|
||||||
|
|
||||||
Button *bake;
|
ToolButton *bake;
|
||||||
EditorNode *editor;
|
EditorNode *editor;
|
||||||
|
|
||||||
static EditorProgress *tmp_progress;
|
static EditorProgress *tmp_progress;
|
||||||
|
|
|
@ -350,8 +350,6 @@ ItemListEditor::ItemListEditor() {
|
||||||
|
|
||||||
selected_idx = -1;
|
selected_idx = -1;
|
||||||
|
|
||||||
add_child(memnew(VSeparator));
|
|
||||||
|
|
||||||
toolbar_button = memnew(ToolButton);
|
toolbar_button = memnew(ToolButton);
|
||||||
toolbar_button->set_text(TTR("Items"));
|
toolbar_button->set_text(TTR("Items"));
|
||||||
add_child(toolbar_button);
|
add_child(toolbar_button);
|
||||||
|
|
|
@ -103,24 +103,25 @@ void NavigationMeshEditor::_bind_methods() {
|
||||||
NavigationMeshEditor::NavigationMeshEditor() {
|
NavigationMeshEditor::NavigationMeshEditor() {
|
||||||
|
|
||||||
bake_hbox = memnew(HBoxContainer);
|
bake_hbox = memnew(HBoxContainer);
|
||||||
|
|
||||||
button_bake = memnew(ToolButton);
|
button_bake = memnew(ToolButton);
|
||||||
button_bake->set_text(TTR("Bake!"));
|
bake_hbox->add_child(button_bake);
|
||||||
button_bake->set_toggle_mode(true);
|
button_bake->set_toggle_mode(true);
|
||||||
button_reset = memnew(Button);
|
button_bake->set_text(TTR("Bake NavMesh"));
|
||||||
button_bake->set_tooltip(TTR("Bake the navigation mesh.") + "\n");
|
button_bake->connect("pressed", this, "_bake_pressed");
|
||||||
|
|
||||||
|
button_reset = memnew(ToolButton);
|
||||||
|
bake_hbox->add_child(button_reset);
|
||||||
|
// No button text, we only use a revert icon which is set when entering the tree.
|
||||||
|
button_reset->set_tooltip(TTR("Clear the navigation mesh."));
|
||||||
|
button_reset->connect("pressed", this, "_clear_pressed");
|
||||||
|
|
||||||
bake_info = memnew(Label);
|
bake_info = memnew(Label);
|
||||||
bake_hbox->add_child(button_bake);
|
|
||||||
bake_hbox->add_child(button_reset);
|
|
||||||
bake_hbox->add_child(bake_info);
|
bake_hbox->add_child(bake_info);
|
||||||
|
|
||||||
err_dialog = memnew(AcceptDialog);
|
err_dialog = memnew(AcceptDialog);
|
||||||
add_child(err_dialog);
|
add_child(err_dialog);
|
||||||
node = NULL;
|
node = NULL;
|
||||||
|
|
||||||
button_bake->connect("pressed", this, "_bake_pressed");
|
|
||||||
button_reset->connect("pressed", this, "_clear_pressed");
|
|
||||||
button_reset->set_tooltip(TTR("Clear the navigation mesh."));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NavigationMeshEditor::~NavigationMeshEditor() {
|
NavigationMeshEditor::~NavigationMeshEditor() {
|
||||||
|
|
|
@ -43,8 +43,8 @@ class NavigationMeshEditor : public Control {
|
||||||
AcceptDialog *err_dialog;
|
AcceptDialog *err_dialog;
|
||||||
|
|
||||||
HBoxContainer *bake_hbox;
|
HBoxContainer *bake_hbox;
|
||||||
Button *button_bake;
|
ToolButton *button_bake;
|
||||||
Button *button_reset;
|
ToolButton *button_reset;
|
||||||
Label *bake_info;
|
Label *bake_info;
|
||||||
|
|
||||||
NavigationMeshInstance *node;
|
NavigationMeshInstance *node;
|
||||||
|
|
Loading…
Reference in a new issue