summaryrefslogtreecommitdiff
path: root/Data/Scripts/Editor/AssetBrowser.lua
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-11-03 18:52:30 +0800
committerchai <chaifix@163.com>2021-11-03 18:52:30 +0800
commit08ddd44b634d4da78edd0964f539a310544c7883 (patch)
tree108317d9138c3e8a19f3cc3f2ffcfba4768f22d5 /Data/Scripts/Editor/AssetBrowser.lua
parent6f62a3d5ad405dbab5ac031fb8eeb03bdb395904 (diff)
! UI9Slicing
Diffstat (limited to 'Data/Scripts/Editor/AssetBrowser.lua')
-rw-r--r--Data/Scripts/Editor/AssetBrowser.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/Data/Scripts/Editor/AssetBrowser.lua b/Data/Scripts/Editor/AssetBrowser.lua
index 8d8efa6..177d073 100644
--- a/Data/Scripts/Editor/AssetBrowser.lua
+++ b/Data/Scripts/Editor/AssetBrowser.lua
@@ -17,7 +17,8 @@ local tex
AssetBrowser.OnGUI = function(self)
if tex == nil then
- tex = Engine.Resource.LoadTexture("./Resources/Images/brickwall.jpg")
+ tex = Engine.Resource.LoadTexture("./Resources/Images/tile.png")
+ --tex = Engine.Resource.LoadTexture("./Resources/Images/brickwall_small.jpg")
end
if shader == nil then
@@ -30,15 +31,16 @@ AssetBrowser.OnGUI = function(self)
ortho:SetOrtho(0, 400, 400, 0, 0.1, 10)
Debug.Log("AssetBrowser.OnGUI()")
- GL.ClearColor({0.1,0.1,0.1,1})
+ GL.ClearColor({0.13, 0.13, 0.13, 1})
GL.Clear(GL.EBufferType.ColorBuffer)
Engine.Rendering.UseShader(shader)
Engine.Rendering.SetMatrix44("gamelab_mat_mvp", ortho)
Engine.Rendering.SetVector2("gamelab_ui_position", {0, 0})
--Engine.Rendering.SetTexture("gamelab_main_tex", tex)
- --Engine.Rendering.DrawUIQuad({0, 0, 10, 20})
- _G["default_font"]:GetCharacters("你好世界!Hello,World! Project Window Properties", 12)
+ --Engine.Rendering.DrawUIQuad({0, 0, 200, 200})
+ _G["default_font"]:GetCharacters("你好世界!Hello,World! Project Window Properties", 12)
+ --Engine.Rendering.DrawUI9Slicing(1, {25, 25}, {25, 25}, {80, 80}, {200, 200} )
Engine.Rendering.ResetUniformState()
end