From 850d9c034792b96e2ff5ff3bbfbcc30661757aed Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 19 Nov 2021 21:56:08 +0800 Subject: *misc --- Data/BuiltIn/Libraries/GameLab/Camera.lua | 0 .../BuiltIn/Libraries/GameLab/Engine/GUI/IMGUI.lua | 5 +++++ Data/BuiltIn/Libraries/GameLab/Helper.lua | 26 ++++++++++++++++++++++ Data/BuiltIn/Libraries/GameLab/StringUtil.lua | 4 ++++ Data/BuiltIn/Libraries/GameLab/define.lua | 1 - Data/Libraries/GameLab/Editor/Window/GUIWindow.lua | 8 +++---- Data/Scripts/EditorResources.lua | 11 +++++++++ Data/Scripts/defines.lua | 5 +++++ 8 files changed, 55 insertions(+), 5 deletions(-) create mode 100644 Data/BuiltIn/Libraries/GameLab/Camera.lua create mode 100644 Data/BuiltIn/Libraries/GameLab/Helper.lua create mode 100644 Data/BuiltIn/Libraries/GameLab/StringUtil.lua create mode 100644 Data/Scripts/EditorResources.lua (limited to 'Data') diff --git a/Data/BuiltIn/Libraries/GameLab/Camera.lua b/Data/BuiltIn/Libraries/GameLab/Camera.lua new file mode 100644 index 0000000..e69de29 diff --git a/Data/BuiltIn/Libraries/GameLab/Engine/GUI/IMGUI.lua b/Data/BuiltIn/Libraries/GameLab/Engine/GUI/IMGUI.lua index a16c2ed..cf84bff 100644 --- a/Data/BuiltIn/Libraries/GameLab/Engine/GUI/IMGUI.lua +++ b/Data/BuiltIn/Libraries/GameLab/Engine/GUI/IMGUI.lua @@ -15,6 +15,11 @@ local Rendering = GameLab.Engine.Rendering local EEventType = GameLab.Events.EEventType local Resource = GameLab.Engine.Resource +local EditorRes +if GAMELAB_EDITOR then + EditorRes = find "Scripts/EditorResources" +end + GUI.BeginOnGUI = function() GUIState.ResetControlID() end diff --git a/Data/BuiltIn/Libraries/GameLab/Helper.lua b/Data/BuiltIn/Libraries/GameLab/Helper.lua new file mode 100644 index 0000000..19b586e --- /dev/null +++ b/Data/BuiltIn/Libraries/GameLab/Helper.lua @@ -0,0 +1,26 @@ +local Helper = GameLab.GlobalClass("GameLab.Helper") + +function Helper:Ctor() + self.path = {} + self.cpath = {} +end + +function Helper:RestorePath() + local path = package.path + +end + +function Helper:RestoreCPath() + local cpath = package.cpath + +end + +function Helper:AddPath() + +end + +function Helper:AddCPath() + +end + +return Helper \ No newline at end of file diff --git a/Data/BuiltIn/Libraries/GameLab/StringUtil.lua b/Data/BuiltIn/Libraries/GameLab/StringUtil.lua new file mode 100644 index 0000000..6b1c027 --- /dev/null +++ b/Data/BuiltIn/Libraries/GameLab/StringUtil.lua @@ -0,0 +1,4 @@ +local util = Gamelab.GloablTable("GameLab.StringUtil") + + +return util \ No newline at end of file diff --git a/Data/BuiltIn/Libraries/GameLab/define.lua b/Data/BuiltIn/Libraries/GameLab/define.lua index dd4420e..ba1e130 100644 --- a/Data/BuiltIn/Libraries/GameLab/define.lua +++ b/Data/BuiltIn/Libraries/GameLab/define.lua @@ -1,4 +1,3 @@ - local define = {} define.builtInPath = "./BuiltIn" diff --git a/Data/Libraries/GameLab/Editor/Window/GUIWindow.lua b/Data/Libraries/GameLab/Editor/Window/GUIWindow.lua index c430cfd..f1f4445 100644 --- a/Data/Libraries/GameLab/Editor/Window/GUIWindow.lua +++ b/Data/Libraries/GameLab/Editor/Window/GUIWindow.lua @@ -19,10 +19,10 @@ local clone = Utils.Clone local i = 0 local col = { - {1, 0, 0, 1}, - {1, 1, 0, 1}, - {0, 0, 1, 1}, - {0, 1, 1, 1}, + {1, 0, 0, 0.5}, + {1, 1, 0, 0.5}, + {0, 0, 1, 0.5}, + {0, 1, 1, 0.5}, } local kSideBorders = 2 -- GUIView的右边距 diff --git a/Data/Scripts/EditorResources.lua b/Data/Scripts/EditorResources.lua new file mode 100644 index 0000000..c9d2e77 --- /dev/null +++ b/Data/Scripts/EditorResources.lua @@ -0,0 +1,11 @@ +local find = GameLab.Find + +local res = {} + +local loadRes = function() + +end + +GameLab.onApplicationStart:Add(loadRes) + +return res \ No newline at end of file diff --git a/Data/Scripts/defines.lua b/Data/Scripts/defines.lua index cec592c..ec456a5 100644 --- a/Data/Scripts/defines.lua +++ b/Data/Scripts/defines.lua @@ -1,2 +1,7 @@ GAMELAB_PROFILE = true GAMELAB_DEBUG = true + +GAMELAB_EDITOR = true +GAMELAB_RUNNER = false + +GAMELAB_VERSION = "0.0.1" -- cgit v1.1-26-g67d0