summaryrefslogtreecommitdiff
path: root/Editor/Scripting/EditorScripting.cpp
blob: 65fa8c4c7f420e5b114108fcaf16dc868460ee65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include "EditorScripting.h"
#include "Runtime/Debug/Log.h"

// GameLab.Editor
extern int luaopen_GameLab_Editor_GUI(lua_State* L); // GameLab.Editor.GUI
extern int luaopen_GameLab_Editor_GUILayout(lua_State* L); // GameLab.Editor.GUILayout
extern int luaopen_GameLab_Editor_IMGUI(lua_State* L); // GameLab.Editor.IMGUI
extern int luaopen_GameLab_Editor_Resource(lua_State* L); // GameLab.Editor.Resource

// GameLab.Engine
extern int luaopen_GameLab_Engine_Rendering(lua_State* L); // GameLab.Engine.Rendering

// GameLab
extern int luaopen_GameLab_Debug(lua_State* L);

#define openlib(cfunc) \
	lua_pushcfunction(L, cfunc);\
	lua_call(L, 0, 0);

bool SetupGameLabEditorScripting(lua_State* L)
{
	log_info("Scripting", "SetupGameLabEditorScripting()");

	openlib(luaopen_GameLab_Debug);
	openlib(luaopen_GameLab_Editor_GUI);

	return true;
}