fixed camera rotation fixed

This commit is contained in:
2024-09-17 15:30:35 +03:00
parent 3c99a0b09c
commit c268a4992a
4 changed files with 72 additions and 118 deletions

View File

@@ -7,6 +7,7 @@
#include <modules/voxel/terrain/voxel_lod_terrain.h>
#include <modules/imgmapper/voxel_generator_imgmapper.h>
#include "from_string.h"
#include "editor_event.h"
#include "world_editor.h"
#include "buildings_editor.h"
@@ -165,13 +166,15 @@ void BuildingsEditor::activate()
for (i = 0; i < (int)ui_handlers.size(); i++)
assert(ui_handlers[i]);
active = true;
editor->event.add_listener(this, &BuildingsEditor::event_handler);
EditorEvent::get_singleton()->event.add_listener(
this, &BuildingsEditor::event_handler);
}
void BuildingsEditor::deactivate()
{
assert(active);
editor->event.remove_listener(this, &BuildingsEditor::event_handler);
EditorEvent::get_singleton()->event.remove_listener(
this, &BuildingsEditor::event_handler);
print_line("BuildingsEditor DEACTIVE");
int i;
for (i = 0; i < (int)ui_handlers.size(); i++)
@@ -464,7 +467,7 @@ void BuildingsEditor::change_building_type(const String &type_name)
void BuildingsEditor::emit(const String &event_string, const Array &event_args)
{
editor->event.emit(event_string, event_args);
EditorEvent::get_singleton()->event.emit(event_string, event_args);
}
void BuildingsEditor::remove_buildings_by_prefix(const String &prefix)