From 71b1d8bea34f72f5fb220a1816f6c9bfaee522e1 Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 22 Nov 2021 09:57:58 +0800 Subject: *misc --- Data/Scripts/EditorResources.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Data/Scripts/EditorResources.lua') 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) -- cgit v1.1-26-g67d0