Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cursors #252

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions extension/src/openvic-extension/register_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "openvic-extension/classes/MapMesh.hpp"
#include "openvic-extension/singletons/AssetManager.hpp"
#include "openvic-extension/singletons/Checksum.hpp"
#include "openvic-extension/singletons/CursorSingleton.hpp"
#include "openvic-extension/singletons/GameSingleton.hpp"
#include "openvic-extension/singletons/LoadLocalisation.hpp"
#include "openvic-extension/singletons/MenuSingleton.hpp"
Expand All @@ -23,6 +24,7 @@ using namespace godot;
using namespace OpenVic;

static Checksum* _checksum_singleton = nullptr;
static CursorSingleton* _cursor_singleton = nullptr;
static LoadLocalisation* _load_localisation = nullptr;
static GameSingleton* _game_singleton = nullptr;
static MenuSingleton* _menu_singleton = nullptr;
Expand All @@ -39,6 +41,10 @@ void initialize_openvic_types(ModuleInitializationLevel p_level) {
_checksum_singleton = memnew(Checksum);
Engine::get_singleton()->register_singleton("Checksum", Checksum::get_singleton());

ClassDB::register_class<CursorSingleton>();
_cursor_singleton = memnew(CursorSingleton);
Engine::get_singleton()->register_singleton("CursorSingleton", CursorSingleton::get_singleton());

ClassDB::register_class<LoadLocalisation>();
_load_localisation = memnew(LoadLocalisation);
Engine::get_singleton()->register_singleton("LoadLocalisation", LoadLocalisation::get_singleton());
Expand Down Expand Up @@ -89,6 +95,9 @@ void uninitialize_openvic_types(ModuleInitializationLevel p_level) {
Engine::get_singleton()->unregister_singleton("Checksum");
memdelete(_checksum_singleton);

Engine::get_singleton()->unregister_singleton("CursorSingleton");
memdelete(_cursor_singleton);

Engine::get_singleton()->unregister_singleton("LoadLocalisation");
memdelete(_load_localisation);

Expand Down
Loading