summaryrefslogtreecommitdiff
path: root/Data/Scripts
diff options
context:
space:
mode:
Diffstat (limited to 'Data/Scripts')
-rw-r--r--Data/Scripts/Editor/AssetBrowser.lua15
-rw-r--r--Data/Scripts/EditorApplication.lua5
2 files changed, 5 insertions, 15 deletions
diff --git a/Data/Scripts/Editor/AssetBrowser.lua b/Data/Scripts/Editor/AssetBrowser.lua
index d726654..ecaecda 100644
--- a/Data/Scripts/Editor/AssetBrowser.lua
+++ b/Data/Scripts/Editor/AssetBrowser.lua
@@ -27,24 +27,17 @@ AssetBrowser.OnGUI = function(self)
end
local ortho = Matrix44.New()
- ortho:SetOrtho(0, 400, 400, 0, 0.1, 10)
+ ortho:SetOrtho(0, 400, 0, 400, 0.1, 10)
Debug.Log("AssetBrowser.OnGUI()")
GL.ClearColor({0.1,0.1,0.1,1})
GL.Clear(GL.EBufferType.ColorBuffer)
- -- GL.Color({1,1,0,1})
- -- GL.LoadPixelMatrix(-250, 250, -300, 300)
- -- GL.Begin(GL.EPrimitiveType.Triangles)
- -- GL.Vertex({0,0,-1})
- -- GL.Vertex({0,300,-1})
- -- GL.Vertex({250,0,-1})
- -- GL.End()
Engine.Rendering.UseShader(shader)
Engine.Rendering.SetMatrix44("gamelab_mat_mvp", ortho)
- Engine.Rendering.SetTexture("uiTex", tex)
- Engine.Rendering.DrawUIQuad({10, 30, 300, 300})
-
+ --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.ResetUniformState()
end
diff --git a/Data/Scripts/EditorApplication.lua b/Data/Scripts/EditorApplication.lua
index eb3c7d8..535136b 100644
--- a/Data/Scripts/EditorApplication.lua
+++ b/Data/Scripts/EditorApplication.lua
@@ -113,11 +113,8 @@ local fsh = [[
BeforeMainLoop()
-local font = Engine.GUI.Font.New("./Resources/Font/deng.ttf", {256, 256}, 5, 5)
+local font = Engine.GUI.Font.New("./Resources/Font/msyh.ttc", {512, 512}, 5, 5)
_G["default_font"] = font
-font:GetCharacters([[
-UTF-8是Unicode的一种实现,是一种变长字节编码方式。对于某一个字符的UTF-8编码,如果只有一个字节则其最高二进制位为0;如果是多字节,其第一个字节从最高位开始,连续的二进制位值为1的个数决定了其编码的位数,其余各字节均以10开头。UTF-8最多可用到6个字节。
-]], 12)
while true do