summaryrefslogtreecommitdiff
path: root/Data
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-11-05 14:25:39 +0800
committerchai <chaifix@163.com>2021-11-05 14:25:39 +0800
commit2b9621a46288532b352b7838f96aca80f971e3d1 (patch)
tree6131ef5484e4f6d4c14c541b65a107869e3b112e /Data
parent6d5787d8da9ad1685864668dd4c3d6aa73a563db (diff)
*misc
Diffstat (limited to 'Data')
-rw-r--r--Data/Libraries/GameLab/Editor/EditorWindow.lua5
-rw-r--r--Data/Libraries/GameLab/Editor/GUI/Functions.lua0
-rw-r--r--Data/Libraries/GameLab/Editor/GUI/init.lua2
-rw-r--r--Data/Scripts/Editor/AssetBrowser.lua9
-rw-r--r--Data/Scripts/EditorApplication.lua17
5 files changed, 10 insertions, 23 deletions
diff --git a/Data/Libraries/GameLab/Editor/EditorWindow.lua b/Data/Libraries/GameLab/Editor/EditorWindow.lua
index af79771..0122b2c 100644
--- a/Data/Libraries/GameLab/Editor/EditorWindow.lua
+++ b/Data/Libraries/GameLab/Editor/EditorWindow.lua
@@ -1,3 +1,8 @@
+-- EditorWindow是应用级别的逻辑窗口
+-- ContainerWindow
+-- |- GUIWindow
+-- |- EditorWindow
+
local EditorWindow = GameLab.Class("GameLab.Editor.EditorWindow")
EditorWindow.Ctor = function(self, title)
diff --git a/Data/Libraries/GameLab/Editor/GUI/Functions.lua b/Data/Libraries/GameLab/Editor/GUI/Functions.lua
deleted file mode 100644
index e69de29..0000000
--- a/Data/Libraries/GameLab/Editor/GUI/Functions.lua
+++ /dev/null
diff --git a/Data/Libraries/GameLab/Editor/GUI/init.lua b/Data/Libraries/GameLab/Editor/GUI/init.lua
index a1ccb7c..8e9b899 100644
--- a/Data/Libraries/GameLab/Editor/GUI/init.lua
+++ b/Data/Libraries/GameLab/Editor/GUI/init.lua
@@ -3,6 +3,4 @@ local m = GameLab.Editor.GUI
local import = GameLab.import(...)
-import("Functions")
-
return m \ No newline at end of file
diff --git a/Data/Scripts/Editor/AssetBrowser.lua b/Data/Scripts/Editor/AssetBrowser.lua
index d975934..42f4d71 100644
--- a/Data/Scripts/Editor/AssetBrowser.lua
+++ b/Data/Scripts/Editor/AssetBrowser.lua
@@ -3,6 +3,7 @@ local AssetBrowser = GameLab.Editor.EditorWindow.Extend("GameLab.Editor.AssetBro
local GL = GameLab.Engine.GL
local Matrix44 = GameLab.Engine.Math.Matrix44
local Engine = GameLab.Engine
+local Editor = GameLab.Editor
local IO = GameLab.IO
local inspect = require("inspect")
@@ -38,12 +39,12 @@ AssetBrowser.OnGUI = function(self)
Engine.Rendering.SetVector2("gamelab_ui_position", {0, 0})
--Engine.Rendering.SetTexture("gamelab_main_tex", tex)
--Engine.Rendering.DrawUIQuad({0, 0, 200, 200})
- _G["default_font"]:GetCharacters("你好世界!\nHello,World!\nProject Window Properties", 12)
+ Editor.GUI.Text(_G["default_font"], "你好世界!\nHello,World!\nProject Window Properties", 12)
- Engine.Rendering.SetVector2("gamelab_ui_position", {0, 100})
- _G["default_font"]:GetCharacters("结构体A中包含了4字节长度的int一个", 12)
+ -- Engine.Rendering.SetVector2("gamelab_ui_position", {0, 100})
+ -- Editor.GUI.Text(_G["default_font"], "你好世界!\nHello,World!\nProject Window Properties", 12)
- --Engine.Rendering.DrawUI9Slicing(1, {25, 25}, {25, 25}, {80, 80}, {400, 50} )
+ --Engine.Rendering.DrawUI9Slicing(1, {25, 25}, {25, 25}, {80, 80}, {400, 30} )
end
AssetBrowser.OnFocus = function(self)
diff --git a/Data/Scripts/EditorApplication.lua b/Data/Scripts/EditorApplication.lua
index 535136b..0576994 100644
--- a/Data/Scripts/EditorApplication.lua
+++ b/Data/Scripts/EditorApplication.lua
@@ -29,23 +29,12 @@ guiWindow:SetPosition({0,0, 400, 400})
collectgarbage()
-Debug.Log(GameLab.Path.GetRootDirectory())
-
-Debug.Log(inspect{foo=1,2,3,4})
-
local wnd = AssetBrowser.New()
-Debug.Log(inspect(mainWindow._type))
guiWindow:SetInstance(wnd)
local v = GameLab.Engine.Math.Vector4.New(1,2,3,4)
-Debug.Log(inspect(v))
-
-Debug.Log(EditorWindowManager.name)
local c = Engine.Rendering.Color.New(1,1,1,1)
-Debug.Log(inspect(c))
-
-Debug.Log(inspect(GL.EBufferType))
GL.ClearColor({1,1,1,1})
GL.Clear(GL.EBufferType.ColorBuffer)
@@ -62,13 +51,7 @@ local files = {
"README.txt",
}
-GameLab.IO.ReadFilesAsync(files, function()
- Debug.Log("finished")
-end)
-
local imgData = Engine.Resource.LoadImageData("./Resources/Images/brickwall.jpg")
-Debug.Log(tostring(imgData:GetWidth()))
-Debug.Log(tostring(imgData:GetHeight()))
local tex = Engine.Resource.LoadTexture("./Resources/Images/brickwall.jpg")