mirror of
https://github.com/enduro2d/enduro2d.git
synced 2025-12-13 23:58:18 +07:00
core binds without e2d namespace
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
/*******************************************************************************
|
||||
* 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)
|
||||
******************************************************************************/
|
||||
* 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
|
||||
|
||||
|
||||
@@ -1,17 +1,15 @@
|
||||
/*******************************************************************************
|
||||
* 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)
|
||||
******************************************************************************/
|
||||
* 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 "_core_binds.hpp"
|
||||
|
||||
namespace e2d::bindings::core
|
||||
{
|
||||
void bind_dbgui(sol::state& l) {
|
||||
l["e2d"].get_or_create<sol::table>()
|
||||
["core"].get_or_create<sol::table>()
|
||||
.new_usertype<dbgui>("dbgui",
|
||||
l.new_usertype<dbgui>("dbgui",
|
||||
sol::no_constructor,
|
||||
|
||||
"visible", sol::property(
|
||||
|
||||
@@ -1,32 +1,30 @@
|
||||
/*******************************************************************************
|
||||
* 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)
|
||||
******************************************************************************/
|
||||
* 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 "_core_binds.hpp"
|
||||
|
||||
namespace e2d::bindings::core
|
||||
{
|
||||
void bind_debug(sol::state& l) {
|
||||
l["e2d"].get_or_create<sol::table>()
|
||||
["core"].get_or_create<sol::table>()
|
||||
.new_usertype<debug>("debug",
|
||||
l.new_usertype<debug>("debug",
|
||||
sol::no_constructor,
|
||||
|
||||
"trace", [](debug& d, const char* s){
|
||||
"trace", [](debug& d, str_view s){
|
||||
d.trace(s);
|
||||
},
|
||||
|
||||
"warning", [](debug& d, const char* s){
|
||||
"warning", [](debug& d, str_view s){
|
||||
d.warning(s);
|
||||
},
|
||||
|
||||
"error", [](debug& d, const char* s){
|
||||
"error", [](debug& d, str_view s){
|
||||
d.error(s);
|
||||
},
|
||||
|
||||
"fatal", [](debug& d, const char* s){
|
||||
"fatal", [](debug& d, str_view s){
|
||||
d.fatal(s);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -1,17 +1,15 @@
|
||||
/*******************************************************************************
|
||||
* 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)
|
||||
******************************************************************************/
|
||||
* 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 "_core_binds.hpp"
|
||||
|
||||
namespace e2d::bindings::core
|
||||
{
|
||||
void bind_engine(sol::state& l) {
|
||||
l["e2d"].get_or_create<sol::table>()
|
||||
["core"].get_or_create<sol::table>()
|
||||
.new_usertype<engine>("engine",
|
||||
l.new_usertype<engine>("engine",
|
||||
sol::no_constructor,
|
||||
|
||||
"time", sol::property(&engine::time),
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/*******************************************************************************
|
||||
* 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)
|
||||
******************************************************************************/
|
||||
* 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 "_core_binds.hpp"
|
||||
|
||||
@@ -36,18 +36,14 @@ namespace
|
||||
namespace e2d::bindings::core
|
||||
{
|
||||
void bind_input(sol::state& l) {
|
||||
l["e2d"].get_or_create<sol::table>()
|
||||
["core"].get_or_create<sol::table>()
|
||||
.new_usertype<input>("input",
|
||||
l.new_usertype<input>("input",
|
||||
sol::no_constructor,
|
||||
|
||||
"mouse", sol::property(&input::mouse),
|
||||
"keyboard", sol::property(&input::keyboard)
|
||||
);
|
||||
|
||||
l["e2d"].get_or_create<sol::table>()
|
||||
["core"].get_or_create<sol::table>()
|
||||
.new_usertype<mouse>("mouse",
|
||||
l.new_usertype<mouse>("mouse",
|
||||
sol::no_constructor,
|
||||
|
||||
"cursor_pos", sol::property([](const mouse& m){
|
||||
@@ -111,9 +107,7 @@ namespace e2d::bindings::core
|
||||
})
|
||||
);
|
||||
|
||||
l["e2d"].get_or_create<sol::table>()
|
||||
["core"].get_or_create<sol::table>()
|
||||
.new_usertype<keyboard>("keyboard",
|
||||
l.new_usertype<keyboard>("keyboard",
|
||||
sol::no_constructor,
|
||||
|
||||
"input_text", sol::property([](const keyboard& k){
|
||||
|
||||
@@ -1,17 +1,15 @@
|
||||
/*******************************************************************************
|
||||
* 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)
|
||||
******************************************************************************/
|
||||
* 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 "_core_binds.hpp"
|
||||
|
||||
namespace e2d::bindings::core
|
||||
{
|
||||
void bind_window(sol::state& l) {
|
||||
l["e2d"].get_or_create<sol::table>()
|
||||
["core"].get_or_create<sol::table>()
|
||||
.new_usertype<window>("window",
|
||||
l.new_usertype<window>("window",
|
||||
sol::no_constructor,
|
||||
|
||||
"hide", &window::hide,
|
||||
|
||||
Reference in New Issue
Block a user