From 7b0a6d1fe0117cf42a5776aaabda2db78599e5b8 Mon Sep 17 00:00:00 2001 From: chai Date: Sun, 15 Nov 2020 19:29:01 +0800 Subject: *misc --- Editor/EditorMain.cpp | 4 +++- Editor/GUI/EditorWindows.cpp | 3 ++- Editor/GUI/EditorWindows.h | 4 ++++ Editor/Scripts/EditorMain.lua | 17 +++++++++++++++++ 4 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 Editor/Scripts/EditorMain.lua (limited to 'Editor') diff --git a/Editor/EditorMain.cpp b/Editor/EditorMain.cpp index d45d08b..8868d88 100644 --- a/Editor/EditorMain.cpp +++ b/Editor/EditorMain.cpp @@ -1,6 +1,7 @@ #include #include #include "GUI/EditorWindows.h" +#include "Runtime/Scripting/LuaBind.h" static int MainMessageLoop() { @@ -22,6 +23,7 @@ static int MainMessageLoop() if (msg.message == WM_QUIT) isQuitSignaled = true; + } } @@ -42,4 +44,4 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR szCmdLine, int sw) MainMessageLoop(); return 0; -} +} \ No newline at end of file diff --git a/Editor/GUI/EditorWindows.cpp b/Editor/GUI/EditorWindows.cpp index 00c573a..6d24dbd 100644 --- a/Editor/GUI/EditorWindows.cpp +++ b/Editor/GUI/EditorWindows.cpp @@ -166,5 +166,6 @@ LRESULT CALLBACK GUIView::GUIViewWndProc(HWND hWnd, UINT message, WPARAM wParam, void GUIView::DoPaint() { - + + } \ No newline at end of file diff --git a/Editor/GUI/EditorWindows.h b/Editor/GUI/EditorWindows.h index a78e163..4bd33ec 100644 --- a/Editor/GUI/EditorWindows.h +++ b/Editor/GUI/EditorWindows.h @@ -3,6 +3,7 @@ #include #include "Runtime/Math/Rect.h" +#include "Runtime/Scripting/LuaBind.h" void RegisterWindowClasses(); @@ -51,6 +52,9 @@ public: private: HWND m_View; + LuaBind::Ref m_Script; + + }; #endif \ No newline at end of file diff --git a/Editor/Scripts/EditorMain.lua b/Editor/Scripts/EditorMain.lua new file mode 100644 index 0000000..2de656d --- /dev/null +++ b/Editor/Scripts/EditorMain.lua @@ -0,0 +1,17 @@ +local Editor = GameLab.Editor +local Engine = GameLab.Engine + +local ViewEditor = {} + +function ViewEditor:OnGUI() + +end + +function main() + local view = Editor.ContainnerWindow.New(ViewEditor) + +end + + + +main() \ No newline at end of file -- cgit v1.1-26-g67d0