You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 13:00:37 +00:00
Remove most EditorNode constructor parameters and fields
This commit is contained in:
@@ -924,7 +924,7 @@ void GridMapEditor::edit(GridMap *p_gridmap) {
|
||||
_update_selection_transform();
|
||||
_update_paste_indicator();
|
||||
|
||||
spatial_editor = Object::cast_to<Node3DEditorPlugin>(editor->get_editor_plugin_screen());
|
||||
spatial_editor = Object::cast_to<Node3DEditorPlugin>(EditorNode::get_singleton()->get_editor_plugin_screen());
|
||||
|
||||
if (!node) {
|
||||
set_process(false);
|
||||
@@ -1160,9 +1160,8 @@ void GridMapEditor::_bind_methods() {
|
||||
ClassDB::bind_method("_set_selection", &GridMapEditor::_set_selection);
|
||||
}
|
||||
|
||||
GridMapEditor::GridMapEditor(EditorNode *p_editor) {
|
||||
editor = p_editor;
|
||||
undo_redo = p_editor->get_undo_redo();
|
||||
GridMapEditor::GridMapEditor() {
|
||||
undo_redo = EditorNode::get_singleton()->get_undo_redo();
|
||||
|
||||
int mw = EDITOR_DEF("editors/grid_map/palette_min_width", 230);
|
||||
Control *ec = memnew(Control);
|
||||
@@ -1490,13 +1489,11 @@ void GridMapEditorPlugin::make_visible(bool p_visible) {
|
||||
}
|
||||
}
|
||||
|
||||
GridMapEditorPlugin::GridMapEditorPlugin(EditorNode *p_node) {
|
||||
editor = p_node;
|
||||
|
||||
GridMapEditorPlugin::GridMapEditorPlugin(EditorNode *_p_node) {
|
||||
EDITOR_DEF("editors/grid_map/editor_side", 1);
|
||||
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "editors/grid_map/editor_side", PROPERTY_HINT_ENUM, "Left,Right"));
|
||||
|
||||
grid_map_editor = memnew(GridMapEditor(editor));
|
||||
grid_map_editor = memnew(GridMapEditor);
|
||||
switch ((int)EditorSettings::get_singleton()->get("editors/grid_map/editor_side")) {
|
||||
case 0: { // Left.
|
||||
Node3DEditor::get_singleton()->add_control_to_left_panel(grid_map_editor);
|
||||
|
||||
Reference in New Issue
Block a user