diff options
author | chai <chaifix@163.com> | 2021-11-20 17:32:55 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-11-20 17:32:55 +0800 |
commit | bb452bba78dc1870d6316b383180472fe3a8a06a (patch) | |
tree | 6084d6c608e00f28fe4b1437e0df228d68c268de /Data/Libraries | |
parent | 74ca8143a7c2352425d549b681b2838bda5ee218 (diff) |
*gui
Diffstat (limited to 'Data/Libraries')
-rw-r--r-- | Data/Libraries/GameLab/Editor/Window/GUIWindow.lua | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Data/Libraries/GameLab/Editor/Window/GUIWindow.lua b/Data/Libraries/GameLab/Editor/Window/GUIWindow.lua index b5d7436..9290b1e 100644 --- a/Data/Libraries/GameLab/Editor/Window/GUIWindow.lua +++ b/Data/Libraries/GameLab/Editor/Window/GUIWindow.lua @@ -14,6 +14,7 @@ local Event = Events.Event local EEventType = Events.EEventType
local Vector2 = Math.Vector2
local Color = Rendering.Color
+local Matrix44 = Math.Matrix44
local clone = Utils.Clone
@@ -113,7 +114,18 @@ GUIWindow.OnGUI = function(self) end
self:ClearBackground()
- GUI.Box(Rect(), Color(), self.position.size)
+
+ local windowSize = self.position.size
+
+ local ortho = Matrix44()
+ ortho:SetOrtho(0, windowSize.x, windowSize.y, 0, 0.1, 10)
+ Rendering.SetMatrix44("gamelab_mat_mvp", ortho)
+
+ --
+ local guiSize = Vector2(windowSize.x - kSideBorders*2, windowSize.y - kSideBorders*2)
+ local bgRect = Rect(kSideBorders, kSideBorders, guiSize.x, guiSize.y)
+ GUI.Box(bgRect, Color(0.22, 0.22, 0.22, 1))
+ GUI.BoxFrame(bgRect, Color(0.13, 0.13, 0.13, 1))
end
|