From 88c864ac6a6c90d63774e8f7b13eb8dcb1db56e5 Mon Sep 17 00:00:00 2001 From: Josef Date: Sun, 24 Mar 2024 16:29:50 +0100 Subject: [PATCH] Initial Commit --- .gitignore | 2 ++ RJAction.cpp | 32 +++++++++++++++++++++++++++ RJAction.h | 28 ++++++++++++++++++++++++ RJNetworkNode.cpp | 18 +++++++++++++++ RJNetworkNode.h | 23 ++++++++++++++++++++ RJSelector.cpp | 19 ++++++++++++++++ RJSelector.h | 27 +++++++++++++++++++++++ SCsub | 5 +++++ config.py | 6 +++++ icons/RJAction.svg | 52 ++++++++++++++++++++++++++++++++++++++++++++ icons/RJIcon.svg | 43 ++++++++++++++++++++++++++++++++++++ icons/RJSelector.svg | 43 ++++++++++++++++++++++++++++++++++++ register_types.cpp | 32 +++++++++++++++++++++++++++ register_types.h | 13 +++++++++++ 14 files changed, 343 insertions(+) create mode 100644 .gitignore create mode 100644 RJAction.cpp create mode 100644 RJAction.h create mode 100644 RJNetworkNode.cpp create mode 100644 RJNetworkNode.h create mode 100644 RJSelector.cpp create mode 100644 RJSelector.h create mode 100644 SCsub create mode 100644 config.py create mode 100644 icons/RJAction.svg create mode 100644 icons/RJIcon.svg create mode 100644 icons/RJSelector.svg create mode 100644 register_types.cpp create mode 100644 register_types.h diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9775e70 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/__pycache__/ +*.obj \ No newline at end of file diff --git a/RJAction.cpp b/RJAction.cpp new file mode 100644 index 0000000..18779df --- /dev/null +++ b/RJAction.cpp @@ -0,0 +1,32 @@ +/* RJAction.cpp */ + +#include "RJAction.h" + + +void RJAction::_bind_methods() +{ + GDVIRTUAL_BIND( _onTrigger ); + + ClassDB::bind_method( D_METHOD( "trigger" ) , &RJAction::trigger ); + + /* + ClassDB::bind_method(D_METHOD("add", "value"), &RokojoriAction::add); + ClassDB::bind_method(D_METHOD("reset"), &RokojoriAction::reset); + ClassDB::bind_method(D_METHOD("get_total"), &RokojoriAction::get_total); + */ +} + +void RJAction::trigger() +{ + GDVIRTUAL_CALL( _onTrigger ); +} + +RJAction::RJAction() +{ + +} + +RJAction::~RJAction() +{ + +} diff --git a/RJAction.h b/RJAction.h new file mode 100644 index 0000000..1ae9fff --- /dev/null +++ b/RJAction.h @@ -0,0 +1,28 @@ +/* RJAction.h */ + +#ifndef ROKOJORI_CORE__ACTION_H +#define ROKOJORI_CORE__ACTION_H + +#include "./RJNetworkNode.h" + +class RJAction : public RJNetworkNode +{ + GDCLASS(RJAction, RJNetworkNode); + + +protected: + static void _bind_methods(); + + GDVIRTUAL0( _onTrigger ) + +public: + + void trigger(); + + RJAction(); + ~RJAction(); + +}; + + +#endif // ROKOJORI_CORE__ACTION_H \ No newline at end of file diff --git a/RJNetworkNode.cpp b/RJNetworkNode.cpp new file mode 100644 index 0000000..1bcfe96 --- /dev/null +++ b/RJNetworkNode.cpp @@ -0,0 +1,18 @@ +/* RJNetworkNode.cpp */ + +#include "RJNetworkNode.h" + +void RJNetworkNode::_bind_methods() +{ + +} + +RJNetworkNode::RJNetworkNode() +{ + +} + +RJNetworkNode::~RJNetworkNode() +{ + +} diff --git a/RJNetworkNode.h b/RJNetworkNode.h new file mode 100644 index 0000000..6065d45 --- /dev/null +++ b/RJNetworkNode.h @@ -0,0 +1,23 @@ +/* RJNetworkNode.h */ + +#ifndef ROKOJORI_CORE__NETWORK_NODE_H +#define ROKOJORI_CORE__NETWORK_NODE_H + +#include "scene/main/node.h" + + +class RJNetworkNode : public Node +{ + GDCLASS(RJNetworkNode, Node); + +protected: + static void _bind_methods(); + +public: + + RJNetworkNode(); + ~RJNetworkNode(); +}; + + +#endif // ROKOJORI_CORE__NETWORK_NODE_H \ No newline at end of file diff --git a/RJSelector.cpp b/RJSelector.cpp new file mode 100644 index 0000000..c791594 --- /dev/null +++ b/RJSelector.cpp @@ -0,0 +1,19 @@ +/* RJSelector.cpp */ + +#include "RJSelector.h" + + +void RJSelector::_bind_methods() +{ + GDVIRTUAL_BIND( select ); +} + +RJSelector::RJSelector() +{ + +} + +RJSelector::~RJSelector() +{ + +} diff --git a/RJSelector.h b/RJSelector.h new file mode 100644 index 0000000..454fa3a --- /dev/null +++ b/RJSelector.h @@ -0,0 +1,27 @@ +/* RJSelector.h */ + +#ifndef ROKOJORI_CORE__SELECTOR_H +#define ROKOJORI_CORE__SELECTOR_H + +#include "scene/main/node.h" +#include "core/io/resource.h" + +class RJSelector : public Resource +{ + GDCLASS(RJSelector, Resource); + + +protected: + static void _bind_methods(); + + GDVIRTUAL1R(bool, select, Ref) + +public: + + RJSelector(); + ~RJSelector(); + +}; + + +#endif // ROKOJORI_CORE__SELECTOR_H \ No newline at end of file diff --git a/SCsub b/SCsub new file mode 100644 index 0000000..164d6a7 --- /dev/null +++ b/SCsub @@ -0,0 +1,5 @@ +Import('env') +Import("env_modules") + +env_rokojori_action_library = env_modules.Clone() +env_rokojori_action_library.add_source_files(env.modules_sources, "*.cpp") \ No newline at end of file diff --git a/config.py b/config.py new file mode 100644 index 0000000..63819c3 --- /dev/null +++ b/config.py @@ -0,0 +1,6 @@ +def can_build(env, platform): + return True + + +def configure(env): + pass \ No newline at end of file diff --git a/icons/RJAction.svg b/icons/RJAction.svg new file mode 100644 index 0000000..3dbd4da --- /dev/null +++ b/icons/RJAction.svg @@ -0,0 +1,52 @@ + + + + + + diff --git a/icons/RJIcon.svg b/icons/RJIcon.svg new file mode 100644 index 0000000..10ee59e --- /dev/null +++ b/icons/RJIcon.svg @@ -0,0 +1,43 @@ + + + + + + diff --git a/icons/RJSelector.svg b/icons/RJSelector.svg new file mode 100644 index 0000000..b72f716 --- /dev/null +++ b/icons/RJSelector.svg @@ -0,0 +1,43 @@ + + + + + + + diff --git a/register_types.cpp b/register_types.cpp new file mode 100644 index 0000000..af0ea32 --- /dev/null +++ b/register_types.cpp @@ -0,0 +1,32 @@ +/* register_types.cpp */ + +#include "register_types.h" + +#include "core/object/class_db.h" + +#include "./RJNetworkNode.h" +#include "./RJAction.h" +#include "./RJSelector.h" + +void initialize_rokojori_action_library_module( ModuleInitializationLevel p_level ) +{ + if ( p_level != MODULE_INITIALIZATION_LEVEL_SCENE ) + { + return; + } + + ClassDB::register_class(); + ClassDB::register_class(); + ClassDB::register_class(); +} + +void uninitialize_rokojori_action_library_module( ModuleInitializationLevel p_level ) +{ + if ( p_level != MODULE_INITIALIZATION_LEVEL_SCENE ) + { + return; + } + +} + + diff --git a/register_types.h b/register_types.h new file mode 100644 index 0000000..8220b67 --- /dev/null +++ b/register_types.h @@ -0,0 +1,13 @@ +/* register_types.h */ + +#ifndef ROKOJORI_ACTION_LIBRARY_REGISTER_TYPES_H +#define ROKOJORI_ACTION_LIBRARY_REGISTER_TYPES_H + +#include "modules/register_module_types.h" + + +void initialize_rokojori_action_library_module( ModuleInitializationLevel p_level ); +void uninitialize_rokojori_action_library_module( ModuleInitializationLevel p_level ); + + +#endif // ROKOJORI_ACTION_LIBRARY_REGISTER_TYPES_H \ No newline at end of file