summaryrefslogtreecommitdiff
path: root/Data
diff options
context:
space:
mode:
Diffstat (limited to 'Data')
-rw-r--r--Data/Resources/Font/simsun.ttcbin0 -> 18214472 bytes
-rw-r--r--Data/Resources/Metatable/Excel/Icons.xlsxbin12425 -> 12447 bytes
-rw-r--r--Data/Resources/Shaders/Editor-Text.glsl7
-rw-r--r--Data/Scripts/Editor/AssetBrowser.lua6
-rw-r--r--Data/Scripts/EditorApplication.lua2
5 files changed, 10 insertions, 5 deletions
diff --git a/Data/Resources/Font/simsun.ttc b/Data/Resources/Font/simsun.ttc
new file mode 100644
index 0000000..5f22ce3
--- /dev/null
+++ b/Data/Resources/Font/simsun.ttc
Binary files differ
diff --git a/Data/Resources/Metatable/Excel/Icons.xlsx b/Data/Resources/Metatable/Excel/Icons.xlsx
index 7259175..c4c454a 100644
--- a/Data/Resources/Metatable/Excel/Icons.xlsx
+++ b/Data/Resources/Metatable/Excel/Icons.xlsx
Binary files differ
diff --git a/Data/Resources/Shaders/Editor-Text.glsl b/Data/Resources/Shaders/Editor-Text.glsl
index 34412e3..7548507 100644
--- a/Data/Resources/Shaders/Editor-Text.glsl
+++ b/Data/Resources/Shaders/Editor-Text.glsl
@@ -1,3 +1,5 @@
+// 渲染编辑器文字
+
#version 330 core
CMD_BEGIN
@@ -8,6 +10,7 @@ CMD_END
uniform mat4 gamelab_mat_mvp;
uniform sampler2D gamelab_main_tex;
+uniform vec2 gamelab_ui_position;
VSH_BEGIN
layout (location = 0) in vec2 vPos;
@@ -19,7 +22,7 @@ out vec4 color;
void main()
{
- vec2 pos = vPos + vec2(10, 40);
+ vec2 pos = vPos + gamelab_ui_position;
vec4 clip = gamelab_mat_mvp * vec4(pos, -1, 1.0);
gl_Position = clip;
uv = vUV;
@@ -38,7 +41,7 @@ void main()
//vec2 uv = vec2(uv.x, 1 - uv.y);
vec4 sampled = vec4(0.8,0.8,0.8,texture(gamelab_main_tex, uv).r);
sampled *= color;
- // vec4 sampled = vec4(1,1,1,1);
+ //sampled = vec4(1,1,1,1);
FragColor = sampled;
}
FSH_END
diff --git a/Data/Scripts/Editor/AssetBrowser.lua b/Data/Scripts/Editor/AssetBrowser.lua
index ecaecda..0c2d03f 100644
--- a/Data/Scripts/Editor/AssetBrowser.lua
+++ b/Data/Scripts/Editor/AssetBrowser.lua
@@ -27,7 +27,7 @@ AssetBrowser.OnGUI = function(self)
end
local ortho = Matrix44.New()
- ortho:SetOrtho(0, 400, 0, 400, 0.1, 10)
+ ortho:SetOrtho(0, 400, 400, 0, 0.1, 10)
Debug.Log("AssetBrowser.OnGUI()")
GL.ClearColor({0.1,0.1,0.1,1})
@@ -35,9 +35,11 @@ AssetBrowser.OnGUI = function(self)
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)
+ -- _G["default_font"]:GetCharacters("你好世界!Hello,World! Project Window Properties", 15)
+ _G["default_font"]:GetCharacters("A", 17)
Engine.Rendering.ResetUniformState()
end
diff --git a/Data/Scripts/EditorApplication.lua b/Data/Scripts/EditorApplication.lua
index 103dcdf..0aae504 100644
--- a/Data/Scripts/EditorApplication.lua
+++ b/Data/Scripts/EditorApplication.lua
@@ -113,7 +113,7 @@ local fsh = [[
BeforeMainLoop()
-local font = Engine.GUI.Font.New("./Resources/Font/consola.ttf", {512, 512}, 5, 5)
+local font = Engine.GUI.Font.New("./Resources/Font/simsun.ttc", {512, 512}, 5, 5)
_G["default_font"] = font
while true do