diff options
Diffstat (limited to 'Data/Scripts')
-rw-r--r-- | Data/Scripts/Editor/AssetBrowser.lua | 9 | ||||
-rw-r--r-- | Data/Scripts/EditorApplication.lua | 17 |
2 files changed, 5 insertions, 21 deletions
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") |