From 2b0a9700b89cdae4bacd42b68c2f35a347a4e2ed Mon Sep 17 00:00:00 2001 From: Relintai Date: Sun, 3 Sep 2023 12:04:53 +0200 Subject: [PATCH] Remove the text from the bakle and clear buttons in the editor for the NavigationMeshEditorPlugin and the NavigationPolygonEditorPlugin. --- .../editor/navigation_mesh_editor_plugin.cpp | 14 +++++++------- .../editor/navigation_mesh_editor_plugin.h | 2 +- .../editor/navigation_polygon_editor_plugin.cpp | 14 +++++++------- .../editor/navigation_polygon_editor_plugin.h | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/modules/navigation_mesh_generator/editor/navigation_mesh_editor_plugin.cpp b/modules/navigation_mesh_generator/editor/navigation_mesh_editor_plugin.cpp index 6af6871f3..e0ac57eef 100644 --- a/modules/navigation_mesh_generator/editor/navigation_mesh_editor_plugin.cpp +++ b/modules/navigation_mesh_generator/editor/navigation_mesh_editor_plugin.cpp @@ -113,7 +113,7 @@ void NavigationMeshEditor::_clear_pressed() { } button_bake->set_pressed(false); - bake_info->set_text(""); + //bake_info->set_text(""); if (node) { node->update_gizmos(); @@ -140,19 +140,19 @@ NavigationMeshEditor::NavigationMeshEditor() { button_bake->set_flat(true); bake_hbox->add_child(button_bake); button_bake->set_toggle_mode(true); - button_bake->set_text(TTR("Bake NavigationMesh")); - button_bake->set_tooltip(TTR("Bakes the NavigationMesh by first parsing the scene for source geometry and then creating the navigation mesh vertices and indices.")); + //button_bake->set_text(TTR("Bake NavigationMesh")); + button_bake->set_tooltip(TTR("Bake NavigationMesh") + "\n" + TTR("Bakes the NavigationMesh by first parsing the scene for source geometry and then creating the navigation mesh vertices and indices.")); button_bake->connect("pressed", this, "_bake_pressed"); button_reset = memnew(Button); button_reset->set_flat(true); bake_hbox->add_child(button_reset); - button_reset->set_text(TTR("Clear NavigationMesh")); - button_reset->set_tooltip(TTR("Clears the internal NavigationMesh vertices and indices.")); + //button_reset->set_text(TTR("Clear NavigationMesh")); + button_reset->set_tooltip(TTR("Clear NavigationMesh") + "\n" + TTR("Clears the internal NavigationMesh vertices and indices.")); button_reset->connect("pressed", this, "_clear_pressed"); - bake_info = memnew(Label); - bake_hbox->add_child(bake_info); + //bake_info = memnew(Label); + //bake_hbox->add_child(bake_info); err_dialog = memnew(AcceptDialog); add_child(err_dialog); diff --git a/modules/navigation_mesh_generator/editor/navigation_mesh_editor_plugin.h b/modules/navigation_mesh_generator/editor/navigation_mesh_editor_plugin.h index 1e64bfce7..1acfc07aa 100644 --- a/modules/navigation_mesh_generator/editor/navigation_mesh_editor_plugin.h +++ b/modules/navigation_mesh_generator/editor/navigation_mesh_editor_plugin.h @@ -51,7 +51,7 @@ class NavigationMeshEditor : public Control { HBoxContainer *bake_hbox = nullptr; Button *button_bake = nullptr; Button *button_reset = nullptr; - Label *bake_info = nullptr; + //Label *bake_info = nullptr; NavigationMeshInstance *node = nullptr; diff --git a/modules/navigation_mesh_generator/editor/navigation_polygon_editor_plugin.cpp b/modules/navigation_mesh_generator/editor/navigation_polygon_editor_plugin.cpp index 422f3a02f..e1fb3bea2 100644 --- a/modules/navigation_mesh_generator/editor/navigation_polygon_editor_plugin.cpp +++ b/modules/navigation_mesh_generator/editor/navigation_polygon_editor_plugin.cpp @@ -140,19 +140,19 @@ NavigationPolygonEditor::NavigationPolygonEditor(EditorNode *p_editor, bool p_wi button_bake->set_flat(true); bake_hbox->add_child(button_bake); button_bake->set_toggle_mode(true); - button_bake->set_text(TTR("Bake NavigationPolygon")); - button_bake->set_tooltip(TTR("Bakes the NavigationPolygon by first parsing the scene for source geometry and then creating the navigation polygon vertices and polygons.")); + //button_bake->set_text(TTR("Bake NavigationPolygon")); + button_bake->set_tooltip(TTR("Bake NavigationPolygon") + "\n" + TTR("Bakes the NavigationPolygon by first parsing the scene for source geometry and then creating the navigation polygon vertices and polygons.")); button_bake->connect("pressed", this, "_bake_pressed"); button_reset = memnew(Button); button_reset->set_flat(true); bake_hbox->add_child(button_reset); - button_reset->set_text(TTR("Clear NavigationPolygon")); - button_reset->set_tooltip(TTR("Clears the internal NavigationPolygon outlines, vertices and polygons.")); + //button_reset->set_text(TTR("Clear NavigationPolygon")); + button_reset->set_tooltip(TTR("Clear NavigationPolygon") + "\n" + TTR("Clears the internal NavigationPolygon outlines, vertices and polygons.")); button_reset->connect("pressed", this, "_clear_pressed"); - bake_info = memnew(Label); - bake_hbox->add_child(bake_info); + //bake_info = memnew(Label); + //bake_hbox->add_child(bake_info); err_dialog = memnew(AcceptDialog); add_child(err_dialog); @@ -205,7 +205,7 @@ void NavigationPolygonEditor::_clear_pressed() { node->get_navigation_polygon()->clear(); button_bake->set_pressed(false); - bake_info->set_text(""); + //bake_info->set_text(""); if (node) { node->update(); diff --git a/modules/navigation_mesh_generator/editor/navigation_polygon_editor_plugin.h b/modules/navigation_mesh_generator/editor/navigation_polygon_editor_plugin.h index b1789d096..c32660247 100644 --- a/modules/navigation_mesh_generator/editor/navigation_polygon_editor_plugin.h +++ b/modules/navigation_mesh_generator/editor/navigation_polygon_editor_plugin.h @@ -54,7 +54,7 @@ class NavigationPolygonEditor : public AbstractPolygon2DEditor { HBoxContainer *bake_hbox = nullptr; Button *button_bake = nullptr; Button *button_reset = nullptr; - Label *bake_info = nullptr; + //Label *bake_info = nullptr; void _bake_pressed(); void _clear_pressed();