diff options
author | chai <chaifix@163.com> | 2021-11-22 09:57:58 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-11-22 09:57:58 +0800 |
commit | 71b1d8bea34f72f5fb220a1816f6c9bfaee522e1 (patch) | |
tree | ea155d9eb6024c1a1e0d00cfbcb65c01add43118 /Data/Scripts | |
parent | 0944b2f95b9971d62f35b9dcc38d28a27e278249 (diff) |
Diffstat (limited to 'Data/Scripts')
-rw-r--r-- | Data/Scripts/EditorResources.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Data/Scripts/EditorResources.lua b/Data/Scripts/EditorResources.lua index bcefec4..63e8069 100644 --- a/Data/Scripts/EditorResources.lua +++ b/Data/Scripts/EditorResources.lua @@ -3,6 +3,7 @@ local find = GameLab.Find local Shader = find "GameLab.Engine.Rendering.Shader"
local Texture = find "GameLab.Engine.Rendering.Texture"
local Rendering = find "GameLab.Engine.Rendering"
+local GUI = find "GameLab.Engine.GUI"
local SHADER = function(path)
local file = 'Resources/Shaders/' .. path
@@ -14,6 +15,11 @@ local TEXTURE = function(path) -- return Rendering.CreateShaderFromFile(file)
end
+local FONT = function(path)
+ local file = 'Resources/Font/' .. path
+ return GUI.Font.New(file, {512, 512}, 5, 5)
+end
+
local res = {}
local loadRes = function()
@@ -22,6 +28,10 @@ local loadRes = function() ["EditorText"] = SHADER "Editor-Text.glsl",
["EditorUI"] = SHADER "Editor-UI.glsl",
}
+
+ res.fonts = {
+ ["Default"] = FONT "msyh.ttc"
+ }
end
GameLab.onApplicationStart:Add(loadRes)
|