feat: updated engine version to 4.4-rc1
This commit is contained in:
parent
ee00efde1f
commit
21ba8e33af
5459 changed files with 1128836 additions and 198305 deletions
|
|
@ -32,11 +32,8 @@
|
|||
|
||||
#ifdef TOOLS_ENABLED
|
||||
|
||||
#include "core/io/marshalls.h"
|
||||
#include "core/io/resource_saver.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_string_names.h"
|
||||
#include "scene/3d/mesh_instance_3d.h"
|
||||
#include "scene/3d/navigation_region_3d.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
#include "scene/gui/button.h"
|
||||
|
|
@ -54,8 +51,8 @@ void NavigationMeshEditor::_node_removed(Node *p_node) {
|
|||
void NavigationMeshEditor::_notification(int p_what) {
|
||||
switch (p_what) {
|
||||
case NOTIFICATION_ENTER_TREE: {
|
||||
button_bake->set_icon(get_theme_icon(SNAME("Bake"), EditorStringName(EditorIcons)));
|
||||
button_reset->set_icon(get_theme_icon(SNAME("Reload"), EditorStringName(EditorIcons)));
|
||||
button_bake->set_button_icon(get_theme_icon(SNAME("Bake"), EditorStringName(EditorIcons)));
|
||||
button_reset->set_button_icon(get_theme_icon(SNAME("Reload"), EditorStringName(EditorIcons)));
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
|
@ -65,7 +62,7 @@ void NavigationMeshEditor::_bake_pressed() {
|
|||
|
||||
ERR_FAIL_NULL(node);
|
||||
Ref<NavigationMesh> navmesh = node->get_navigation_mesh();
|
||||
if (!navmesh.is_valid()) {
|
||||
if (navmesh.is_null()) {
|
||||
err_dialog->set_text(TTR("A NavigationMesh resource must be set or created for this node to work."));
|
||||
err_dialog->popup_centered();
|
||||
return;
|
||||
|
|
@ -126,14 +123,11 @@ void NavigationMeshEditor::edit(NavigationRegion3D *p_nav_region) {
|
|||
node = p_nav_region;
|
||||
}
|
||||
|
||||
void NavigationMeshEditor::_bind_methods() {
|
||||
}
|
||||
|
||||
NavigationMeshEditor::NavigationMeshEditor() {
|
||||
bake_hbox = memnew(HBoxContainer);
|
||||
|
||||
button_bake = memnew(Button);
|
||||
button_bake->set_theme_type_variation("FlatButton");
|
||||
button_bake->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
bake_hbox->add_child(button_bake);
|
||||
button_bake->set_toggle_mode(true);
|
||||
button_bake->set_text(TTR("Bake NavigationMesh"));
|
||||
|
|
@ -141,7 +135,7 @@ NavigationMeshEditor::NavigationMeshEditor() {
|
|||
button_bake->connect(SceneStringName(pressed), callable_mp(this, &NavigationMeshEditor::_bake_pressed));
|
||||
|
||||
button_reset = memnew(Button);
|
||||
button_reset->set_theme_type_variation("FlatButton");
|
||||
button_reset->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
bake_hbox->add_child(button_reset);
|
||||
button_reset->set_text(TTR("Clear NavigationMesh"));
|
||||
button_reset->set_tooltip_text(TTR("Clears the internal NavigationMesh vertices and polygons."));
|
||||
|
|
@ -179,7 +173,7 @@ void NavigationMeshEditorPlugin::make_visible(bool p_visible) {
|
|||
|
||||
NavigationMeshEditorPlugin::NavigationMeshEditorPlugin() {
|
||||
navigation_mesh_editor = memnew(NavigationMeshEditor);
|
||||
EditorNode::get_singleton()->get_main_screen_control()->add_child(navigation_mesh_editor);
|
||||
EditorNode::get_singleton()->get_gui_base()->add_child(navigation_mesh_editor);
|
||||
add_control_to_container(CONTAINER_SPATIAL_EDITOR_MENU, navigation_mesh_editor->bake_hbox);
|
||||
navigation_mesh_editor->hide();
|
||||
navigation_mesh_editor->bake_hbox->hide();
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ class NavigationMeshEditor : public Control {
|
|||
|
||||
protected:
|
||||
void _node_removed(Node *p_node);
|
||||
static void _bind_methods();
|
||||
void _notification(int p_what);
|
||||
|
||||
public:
|
||||
|
|
@ -75,7 +74,7 @@ class NavigationMeshEditorPlugin : public EditorPlugin {
|
|||
NavigationMeshEditor *navigation_mesh_editor = nullptr;
|
||||
|
||||
public:
|
||||
virtual String get_name() const override { return "NavigationMesh"; }
|
||||
virtual String get_plugin_name() const override { return "NavigationMesh"; }
|
||||
bool has_main_screen() const override { return false; }
|
||||
virtual void edit(Object *p_object) override;
|
||||
virtual bool handles(Object *p_object) const override;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue