From d8417b03b9c2a820d3d3be0dfa80841b4d1f4c04 Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 9 Nov 2021 19:22:13 +0800 Subject: *misc --- .../GameLab/Editor/GUI/ContainerWindow.lua | 12 ++++++------ Data/Libraries/GameLab/Editor/GUI/GUIWindow.lua | 22 ++++++++++++++-------- Data/Libraries/GameLab/Editor/GUI/SplitWindow.lua | 2 ++ 3 files changed, 22 insertions(+), 14 deletions(-) (limited to 'Data/Libraries') diff --git a/Data/Libraries/GameLab/Editor/GUI/ContainerWindow.lua b/Data/Libraries/GameLab/Editor/GUI/ContainerWindow.lua index af525f0..b270110 100644 --- a/Data/Libraries/GameLab/Editor/GUI/ContainerWindow.lua +++ b/Data/Libraries/GameLab/Editor/GUI/ContainerWindow.lua @@ -1,20 +1,20 @@ -local InternalContainWidow = GameLab.Editor.GUI.Internal.ContainerWindow +local NativeContainWidow = GameLab.Editor.GUI.Internal.ContainerWindow local ContainerWindow = GameLab.GlobalClass("GameLab.Editor.GUI.ContainerWindow") ContainerWindow.Ctor = function(self, position, showMode, min, max) - self.m_Internal = InternalContainWidow.New(position, showMode, min, max) + self.m_Native = NativeContainWidow.New(position, showMode, min, max) end ContainerWindow.SetTitle = function(self) - self.m_Internal:SetTitle(self) + self.m_Native:SetTitle(self) end ContainerWindow.SetIcon = function(self) - self.m_Internal:SetIcon(self) + self.m_Native:SetIcon(self) end -ContainerWindow.GetInternal = function(self) - return self.m_Internal +ContainerWindow.GetNative = function(self) + return self.m_Native end return ContainerWindow \ No newline at end of file diff --git a/Data/Libraries/GameLab/Editor/GUI/GUIWindow.lua b/Data/Libraries/GameLab/Editor/GUI/GUIWindow.lua index e283c07..f136d56 100644 --- a/Data/Libraries/GameLab/Editor/GUI/GUIWindow.lua +++ b/Data/Libraries/GameLab/Editor/GUI/GUIWindow.lua @@ -1,6 +1,8 @@ -local InternalGUIWindow = GameLab.Editor.GUI.Internal.GUIWindow +local NativeGUIWindow = GameLab.Editor.GUI.Internal.GUIWindow local GUIWindow = GameLab.GlobalClass("GameLab.Editor.GUI.GUIWindow") +local inspect = require("inspect") + local Debug = GameLab.Debug local GL = GameLab.Engine.GL local Math = GameLab.Engine.Math @@ -9,25 +11,25 @@ local Rendering = GameLab.Engine.Rendering local Rect = Math.Rect GUIWindow.Ctor = function(self) - self.m_Internal = InternalGUIWindow.New(self) + self.m_Native = NativeGUIWindow.New(self) self.m_ContainerWindow = nil - self.m_SplitWindow = nil + self.m_SplitWindow = nil -- parent window self.m_Position = Rect.New(0,0,0,0) -- 在父窗口中的位置和大小 self.m_EditorWindows = {} -- 编辑器脚本 end GUIWindow.SetContainerWindow = function(self, containerWindow) self.m_ContainerWindow = containerWindow - self.m_Internal:SetContainerWindow(containerWindow:GetInternal()) + self.m_Native:SetContainerWindow(containerWindow:GetNative()) end GUIWindow.SetPosition = function(self, pos) self.m_Position:Set(pos) - self.m_Internal:SetPosition(pos) + self.m_Native:SetPosition(pos) end -GUIWindow.GetInternal = function(self) - return self.m_Internal +GUIWindow.GetNative = function(self) + return self.m_Native end GUIWindow.OnGUI = function(self) @@ -35,9 +37,13 @@ GUIWindow.OnGUI = function(self) end +GUIWindow.OnEvent = function(self, evt) + +end + GUIWindow.GetContainerWindow = function(self) return self.m_ContainerWindow -end +end GUIWindow.OnFocus = function(self) Debug.Log("GUIWindow.OnFocus") diff --git a/Data/Libraries/GameLab/Editor/GUI/SplitWindow.lua b/Data/Libraries/GameLab/Editor/GUI/SplitWindow.lua index 0d6417e..d594bee 100644 --- a/Data/Libraries/GameLab/Editor/GUI/SplitWindow.lua +++ b/Data/Libraries/GameLab/Editor/GUI/SplitWindow.lua @@ -11,4 +11,6 @@ SplitWindow.Ctor = function(self) self.m_GUIWindows = {} end + + return SplitWindow \ No newline at end of file -- cgit v1.1-26-g67d0