mirror of
https://github.com/enduro2d/enduro2d.git
synced 2025-12-15 00:11:55 +07:00
dummy editor module
This commit is contained in:
@@ -53,6 +53,7 @@
|
||||
#include "asset.hpp"
|
||||
#include "asset.inl"
|
||||
#include "atlas.hpp"
|
||||
#include "editor.hpp"
|
||||
#include "factory.hpp"
|
||||
#include "factory.inl"
|
||||
#include "flipbook.hpp"
|
||||
|
||||
@@ -86,6 +86,7 @@ namespace e2d
|
||||
class spine;
|
||||
class sprite;
|
||||
|
||||
class editor;
|
||||
class luasol;
|
||||
class starter;
|
||||
class world;
|
||||
|
||||
18
headers/enduro2d/high/editor.hpp
Normal file
18
headers/enduro2d/high/editor.hpp
Normal file
@@ -0,0 +1,18 @@
|
||||
/*******************************************************************************
|
||||
* This file is part of the "Enduro2D"
|
||||
* For conditions of distribution and use, see copyright notice in LICENSE.md
|
||||
* Copyright (C) 2018-2019, by Matvey Cherevko (blackmatov@gmail.com)
|
||||
******************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "_high.hpp"
|
||||
|
||||
namespace e2d
|
||||
{
|
||||
class editor final : public module<editor> {
|
||||
public:
|
||||
editor();
|
||||
~editor() noexcept final;
|
||||
};
|
||||
}
|
||||
6
samples/bin/library/scripts/emmy/high/editor.lua
Normal file
6
samples/bin/library/scripts/emmy/high/editor.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
---@class editor
|
||||
local editor = {
|
||||
}
|
||||
|
||||
---@type editor
|
||||
_G.the_editor = _G.the_editor or editor
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
namespace e2d::bindings::high
|
||||
{
|
||||
void bind_editor(sol::state& l);
|
||||
void bind_library(sol::state& l);
|
||||
void bind_luasol(sol::state& l);
|
||||
void bind_world(sol::state& l);
|
||||
@@ -33,6 +34,7 @@ namespace e2d::bindings::high
|
||||
namespace e2d::bindings
|
||||
{
|
||||
inline void bind_high(sol::state& l) {
|
||||
high::bind_editor(l);
|
||||
high::bind_library(l);
|
||||
high::bind_luasol(l);
|
||||
high::bind_world(l);
|
||||
|
||||
18
sources/enduro2d/high/bindings/high_binds/editor_binds.cpp
Normal file
18
sources/enduro2d/high/bindings/high_binds/editor_binds.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
/*******************************************************************************
|
||||
* This file is part of the "Enduro2D"
|
||||
* For conditions of distribution and use, see copyright notice in LICENSE.md
|
||||
* Copyright (C) 2018-2019, by Matvey Cherevko (blackmatov@gmail.com)
|
||||
******************************************************************************/
|
||||
|
||||
#include "_high_binds.hpp"
|
||||
|
||||
#include <enduro2d/high/editor.hpp>
|
||||
|
||||
namespace e2d::bindings::high
|
||||
{
|
||||
void bind_editor(sol::state& l) {
|
||||
l.new_usertype<editor>("editor",
|
||||
sol::no_constructor
|
||||
);
|
||||
}
|
||||
}
|
||||
25
sources/enduro2d/high/editor.cpp
Normal file
25
sources/enduro2d/high/editor.cpp
Normal file
@@ -0,0 +1,25 @@
|
||||
/*******************************************************************************
|
||||
* This file is part of the "Enduro2D"
|
||||
* For conditions of distribution and use, see copyright notice in LICENSE.md
|
||||
* Copyright (C) 2018-2019, by Matvey Cherevko (blackmatov@gmail.com)
|
||||
******************************************************************************/
|
||||
|
||||
#include <enduro2d/high/editor.hpp>
|
||||
|
||||
#include <enduro2d/high/widgets/hierarchy_widget.hpp>
|
||||
|
||||
namespace
|
||||
{
|
||||
using namespace e2d;
|
||||
}
|
||||
|
||||
namespace e2d
|
||||
{
|
||||
editor::editor() {
|
||||
if ( modules::is_initialized<dbgui>() ) {
|
||||
the<dbgui>().register_menu_widget<dbgui_widgets::hierarchy_widget>("Scene", "Hierarchy");
|
||||
}
|
||||
}
|
||||
|
||||
editor::~editor() noexcept = default;
|
||||
}
|
||||
@@ -6,10 +6,11 @@
|
||||
|
||||
#include <enduro2d/high/starter.hpp>
|
||||
|
||||
#include <enduro2d/high/world.hpp>
|
||||
#include <enduro2d/high/luasol.hpp>
|
||||
#include <enduro2d/high/editor.hpp>
|
||||
#include <enduro2d/high/factory.hpp>
|
||||
#include <enduro2d/high/library.hpp>
|
||||
#include <enduro2d/high/luasol.hpp>
|
||||
#include <enduro2d/high/world.hpp>
|
||||
|
||||
#include <enduro2d/high/components/actor.hpp>
|
||||
#include <enduro2d/high/components/behaviour.hpp>
|
||||
@@ -32,8 +33,6 @@
|
||||
#include <enduro2d/high/systems/script_system.hpp>
|
||||
#include <enduro2d/high/systems/spine_system.hpp>
|
||||
|
||||
#include <enduro2d/high/widgets/hierarchy_widget.hpp>
|
||||
|
||||
namespace
|
||||
{
|
||||
using namespace e2d;
|
||||
@@ -201,15 +200,13 @@ namespace e2d
|
||||
params.library_params().root());
|
||||
|
||||
safe_module_initialize<world>();
|
||||
|
||||
if ( modules::is_initialized<dbgui>() ) {
|
||||
the<dbgui>().register_menu_widget<dbgui_widgets::hierarchy_widget>("Scene", "Hierarchy");
|
||||
}
|
||||
safe_module_initialize<editor>();
|
||||
}
|
||||
|
||||
starter::~starter() noexcept {
|
||||
the<luasol>().collect_garbage();
|
||||
|
||||
modules::shutdown<editor>();
|
||||
modules::shutdown<world>();
|
||||
modules::shutdown<library>();
|
||||
modules::shutdown<luasol>();
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <enduro2d/high/systems/script_system.hpp>
|
||||
|
||||
#include <enduro2d/high/editor.hpp>
|
||||
#include <enduro2d/high/library.hpp>
|
||||
#include <enduro2d/high/luasol.hpp>
|
||||
#include <enduro2d/high/world.hpp>
|
||||
@@ -31,6 +32,7 @@ namespace
|
||||
}
|
||||
|
||||
void init_high_table(sol::state& s) {
|
||||
s["the_editor"] = &the<editor>();
|
||||
s["the_library"] = &the<library>();
|
||||
s["the_luasol"] = &the<luasol>();
|
||||
s["the_world"] = &the<world>();
|
||||
|
||||
Reference in New Issue
Block a user