Update naar godot 4.0

Nog steeds geen nieuwe features ofzo. kopie van bestaande gridmap.
This commit is contained in:
2022-01-23 17:09:52 +01:00
parent ebf2a30bf3
commit 8121b21329
6 changed files with 222 additions and 158 deletions
+8 -7
View File
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#ifndef GRID_MAP_EDITOR_PLUGIN_H
#define GRID_MAP_EDITOR_PLUGIN_H
#ifndef HEX_MAP_EDITOR_PLUGIN_H
#define HEX_MAP_EDITOR_PLUGIN_H
#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
@@ -201,6 +201,7 @@ class HexMapEditor : public VBoxContainer {
void _update_cursor_transform();
void _update_cursor_instance();
void _update_clip();
void _update_theme();
void _text_changed(const String &p_text);
void _sbox_input(const Ref<InputEvent> &p_ie);
@@ -232,7 +233,7 @@ protected:
static void _bind_methods();
public:
bool forward_spatial_input_event(Camera3D *p_camera, const Ref<InputEvent> &p_event);
EditorPlugin::AfterGUIInput forward_spatial_input_event(Camera3D *p_camera, const Ref<InputEvent> &p_event);
void edit(HexMap *p_gridmap);
HexMapEditor() {}
@@ -250,7 +251,7 @@ protected:
void _notification(int p_what);
public:
virtual bool forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) override { return grid_map_editor->forward_spatial_input_event(p_camera, p_event); }
virtual EditorPlugin::AfterGUIInput forward_spatial_gui_input(Camera3D *p_camera, const Ref<InputEvent> &p_event) override { return grid_map_editor->forward_spatial_input_event(p_camera, p_event); }
virtual String get_name() const override { return "HexMap"; }
bool has_main_screen() const override { return false; }
virtual void edit(Object *p_object) override;
@@ -261,4 +262,4 @@ public:
~HexMapEditorPlugin();
};
#endif // CUBE_GRID_MAP_EDITOR_PLUGIN_H
#endif // HEX_MAP_EDITOR_PLUGIN_H