Added all canvas component classes
This commit is contained in:
parent
cfd6f4b4e0
commit
228469c33d
32 changed files with 1369 additions and 143 deletions
15
src/CanvasComponents/CanvasComponentAllocator.hpp
Normal file
15
src/CanvasComponents/CanvasComponentAllocator.hpp
Normal 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);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue