mirror of
https://github.com/enduro2d/enduro2d.git
synced 2026-01-05 01:51:02 +07:00
dummy layout component and system
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
#include "components/events.hpp"
|
||||
#include "components/flipbook_player.hpp"
|
||||
#include "components/label.hpp"
|
||||
#include "components/layout.hpp"
|
||||
#include "components/model_renderer.hpp"
|
||||
#include "components/named.hpp"
|
||||
#include "components/renderer.hpp"
|
||||
@@ -50,6 +51,7 @@
|
||||
#include "systems/frame_system.hpp"
|
||||
#include "systems/gizmos_system.hpp"
|
||||
#include "systems/label_system.hpp"
|
||||
#include "systems/layout_system.hpp"
|
||||
#include "systems/render_system.hpp"
|
||||
#include "systems/script_system.hpp"
|
||||
#include "systems/spine_system.hpp"
|
||||
|
||||
@@ -57,6 +57,7 @@ namespace e2d
|
||||
class events;
|
||||
class flipbook_player;
|
||||
class label;
|
||||
class layout;
|
||||
class model_renderer;
|
||||
class named;
|
||||
class renderer;
|
||||
@@ -70,6 +71,7 @@ namespace e2d
|
||||
class frame_system;
|
||||
class gizmos_system;
|
||||
class label_system;
|
||||
class layout_system;
|
||||
class render_system;
|
||||
class script_system;
|
||||
class spine_system;
|
||||
|
||||
76
headers/enduro2d/high/components/layout.hpp
Normal file
76
headers/enduro2d/high/components/layout.hpp
Normal file
@@ -0,0 +1,76 @@
|
||||
/*******************************************************************************
|
||||
* This file is part of the "Enduro2D"
|
||||
* For conditions of distribution and use, see copyright notice in LICENSE.md
|
||||
* Copyright (C) 2018-2020, by Matvey Cherevko (blackmatov@gmail.com)
|
||||
******************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "_components.hpp"
|
||||
|
||||
namespace e2d
|
||||
{
|
||||
class layout final {
|
||||
public:
|
||||
layout() = default;
|
||||
};
|
||||
|
||||
class layout_item final {
|
||||
public:
|
||||
layout_item() = default;
|
||||
};
|
||||
}
|
||||
|
||||
namespace e2d
|
||||
{
|
||||
template <>
|
||||
class factory_loader<layout> final : factory_loader<> {
|
||||
public:
|
||||
static const char* schema_source;
|
||||
|
||||
bool operator()(
|
||||
layout& component,
|
||||
const fill_context& ctx) const;
|
||||
|
||||
bool operator()(
|
||||
asset_dependencies& dependencies,
|
||||
const collect_context& ctx) const;
|
||||
};
|
||||
|
||||
template <>
|
||||
class factory_loader<layout_item> final : factory_loader<> {
|
||||
public:
|
||||
static const char* schema_source;
|
||||
|
||||
bool operator()(
|
||||
layout_item& component,
|
||||
const fill_context& ctx) const;
|
||||
|
||||
bool operator()(
|
||||
asset_dependencies& dependencies,
|
||||
const collect_context& ctx) const;
|
||||
};
|
||||
}
|
||||
|
||||
namespace e2d
|
||||
{
|
||||
template <>
|
||||
class component_inspector<layout> final : component_inspector<> {
|
||||
public:
|
||||
static const char* title;
|
||||
|
||||
void operator()(gcomponent<layout>& c) const;
|
||||
};
|
||||
|
||||
template <>
|
||||
class component_inspector<layout_item> final : component_inspector<> {
|
||||
public:
|
||||
static const char* title;
|
||||
|
||||
void operator()(gcomponent<layout_item>& c) const;
|
||||
};
|
||||
}
|
||||
|
||||
namespace e2d
|
||||
{
|
||||
}
|
||||
26
headers/enduro2d/high/systems/layout_system.hpp
Normal file
26
headers/enduro2d/high/systems/layout_system.hpp
Normal file
@@ -0,0 +1,26 @@
|
||||
/*******************************************************************************
|
||||
* This file is part of the "Enduro2D"
|
||||
* For conditions of distribution and use, see copyright notice in LICENSE.md
|
||||
* Copyright (C) 2018-2020, by Matvey Cherevko (blackmatov@gmail.com)
|
||||
******************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "_systems.hpp"
|
||||
|
||||
namespace e2d
|
||||
{
|
||||
class layout_system final
|
||||
: public ecs::system<ecs::after<systems::update_event>> {
|
||||
public:
|
||||
layout_system();
|
||||
~layout_system() noexcept final;
|
||||
|
||||
void process(
|
||||
ecs::registry& owner,
|
||||
const ecs::after<systems::update_event>& trigger) override;
|
||||
private:
|
||||
class internal_state;
|
||||
std::unique_ptr<internal_state> state_;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user