You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
This commit is contained in:
@@ -36,7 +36,6 @@
|
||||
#include "scene/gui/box_container.h"
|
||||
|
||||
void NavigationMeshEditor::_node_removed(Node *p_node) {
|
||||
|
||||
if (p_node == node) {
|
||||
node = NULL;
|
||||
|
||||
@@ -45,9 +44,7 @@ void NavigationMeshEditor::_node_removed(Node *p_node) {
|
||||
}
|
||||
|
||||
void NavigationMeshEditor::_notification(int p_option) {
|
||||
|
||||
if (p_option == NOTIFICATION_ENTER_TREE) {
|
||||
|
||||
button_bake->set_icon(get_icon("Bake", "EditorIcons"));
|
||||
button_reset->set_icon(get_icon("Reload", "EditorIcons"));
|
||||
}
|
||||
@@ -71,7 +68,6 @@ void NavigationMeshEditor::_bake_pressed() {
|
||||
}
|
||||
|
||||
void NavigationMeshEditor::_clear_pressed() {
|
||||
|
||||
if (node)
|
||||
EditorNavigationMeshGenerator::get_singleton()->clear(node->get_navigation_mesh());
|
||||
|
||||
@@ -84,7 +80,6 @@ void NavigationMeshEditor::_clear_pressed() {
|
||||
}
|
||||
|
||||
void NavigationMeshEditor::edit(NavigationMeshInstance *p_nav_mesh_instance) {
|
||||
|
||||
if (p_nav_mesh_instance == NULL || node == p_nav_mesh_instance) {
|
||||
return;
|
||||
}
|
||||
@@ -93,13 +88,11 @@ void NavigationMeshEditor::edit(NavigationMeshInstance *p_nav_mesh_instance) {
|
||||
}
|
||||
|
||||
void NavigationMeshEditor::_bind_methods() {
|
||||
|
||||
ClassDB::bind_method("_bake_pressed", &NavigationMeshEditor::_bake_pressed);
|
||||
ClassDB::bind_method("_clear_pressed", &NavigationMeshEditor::_clear_pressed);
|
||||
}
|
||||
|
||||
NavigationMeshEditor::NavigationMeshEditor() {
|
||||
|
||||
bake_hbox = memnew(HBoxContainer);
|
||||
|
||||
button_bake = memnew(ToolButton);
|
||||
@@ -126,22 +119,18 @@ NavigationMeshEditor::~NavigationMeshEditor() {
|
||||
}
|
||||
|
||||
void NavigationMeshEditorPlugin::edit(Object *p_object) {
|
||||
|
||||
navigation_mesh_editor->edit(Object::cast_to<NavigationMeshInstance>(p_object));
|
||||
}
|
||||
|
||||
bool NavigationMeshEditorPlugin::handles(Object *p_object) const {
|
||||
|
||||
return p_object->is_class("NavigationMeshInstance");
|
||||
}
|
||||
|
||||
void NavigationMeshEditorPlugin::make_visible(bool p_visible) {
|
||||
|
||||
if (p_visible) {
|
||||
navigation_mesh_editor->show();
|
||||
navigation_mesh_editor->bake_hbox->show();
|
||||
} else {
|
||||
|
||||
navigation_mesh_editor->hide();
|
||||
navigation_mesh_editor->bake_hbox->hide();
|
||||
navigation_mesh_editor->edit(NULL);
|
||||
@@ -149,7 +138,6 @@ void NavigationMeshEditorPlugin::make_visible(bool p_visible) {
|
||||
}
|
||||
|
||||
NavigationMeshEditorPlugin::NavigationMeshEditorPlugin(EditorNode *p_node) {
|
||||
|
||||
editor = p_node;
|
||||
navigation_mesh_editor = memnew(NavigationMeshEditor);
|
||||
editor->get_viewport()->add_child(navigation_mesh_editor);
|
||||
|
||||
Reference in New Issue
Block a user