diff options
Diffstat (limited to 'Resources/Scripts')
-rw-r--r-- | Resources/Scripts/Editor/ProjectWindow.lua | 18 | ||||
-rw-r--r-- | Resources/Scripts/EditorApplication.lua | 26 | ||||
-rw-r--r-- | Resources/Scripts/Utils/Utils.lua | 4 |
3 files changed, 39 insertions, 9 deletions
diff --git a/Resources/Scripts/Editor/ProjectWindow.lua b/Resources/Scripts/Editor/ProjectWindow.lua new file mode 100644 index 0000000..18959f2 --- /dev/null +++ b/Resources/Scripts/Editor/ProjectWindow.lua @@ -0,0 +1,18 @@ +local GUI = GameLab.Editor.GUI
+local GUILayout = GameLab.Editor.GUILayout
+
+local ProjectWindow = {
+ ["name"] = "Project",
+}
+
+ProjectWindow.OnGUI = function(self)
+ if GUILayout.Button("click") then
+
+ end
+end
+
+ProjectWindow.OnUpdate = function(self)
+
+end
+
+GUI.RegisterEditorWindow("Project", ProjectWindow, "Custom/Project")
\ No newline at end of file diff --git a/Resources/Scripts/EditorApplication.lua b/Resources/Scripts/EditorApplication.lua index 935547d..c8438cf 100644 --- a/Resources/Scripts/EditorApplication.lua +++ b/Resources/Scripts/EditorApplication.lua @@ -1,19 +1,27 @@ +require "./Scripts/Utils/Utils" + local Debug = GameLab.Debug local GUI = GameLab.Editor.GUI +local app = GameLab.Editor.EditorApplication.New() -Debug.OpenTag("WndProc") - -Debug.Log("WndProc", "123") +if app == nil then + Debug.LogError("app is nil") +end -local i = 0 -while i < 10 do +local mainWindow = GUI.ContainnerWindow.New({400, 400, 800, 500}, GUI.EShowMode.MainWindow, {100, 100}, {700, 700}) +mainWindow:SetTitle("GameLab") +mainWindow:SetIcon("./Icon/GameLab.ico") - i = i + 1 - Debug.Log(i) +app:SetMainWindow(mainWindow) +app:SetupMenu() -end +local guiWindow = GUI.GUIWindow.New() +guiWindow:SetContainnerWindow(mainWindow) +guiWindow:SetPosition({0,0, 500, 400}) +while true do -Debug.Log(GUI.EShowMode.NoShadow) + app:PullMessage() +end
\ No newline at end of file diff --git a/Resources/Scripts/Utils/Utils.lua b/Resources/Scripts/Utils/Utils.lua new file mode 100644 index 0000000..678217b --- /dev/null +++ b/Resources/Scripts/Utils/Utils.lua @@ -0,0 +1,4 @@ +local Utils = GameLab.Editor.Utils or {}
+GameLab.Editor.Utils = Utils
+
+
|