Added all canvas component classes

This commit is contained in:
Yousef Khadadeh 2025-12-13 13:03:27 +03:00
parent cfd6f4b4e0
commit 228469c33d
32 changed files with 1369 additions and 143 deletions

View file

@ -0,0 +1,15 @@
#pragma once
#include <memory>
#include "CanvasComponent.hpp"
#include <Helpers/NetworkingObjects/NetObjTemporaryPtr.hpp>
class CanvasComponentAllocator {
public:
CanvasComponentAllocator();
CanvasComponentAllocator(CanvasComponent::CompType typeToAllocate);
std::unique_ptr<CanvasComponent> comp;
static void register_class(NetworkingObjects::NetObjManager& objMan);
private:
static void write_constructor_func(const NetworkingObjects::NetObjTemporaryPtr<CanvasComponentAllocator>& o, cereal::PortableBinaryOutputArchive& a);
static void read_constructor_func(const NetworkingObjects::NetObjTemporaryPtr<CanvasComponentAllocator>& o, cereal::PortableBinaryInputArchive& a, const std::shared_ptr<NetServer::ClientData>& c);
};