summaryrefslogtreecommitdiff
path: root/Data/Libraries/GameLab/Editor/Window/SplitWindow.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Data/Libraries/GameLab/Editor/Window/SplitWindow.lua')
-rw-r--r--Data/Libraries/GameLab/Editor/Window/SplitWindow.lua26
1 files changed, 19 insertions, 7 deletions
diff --git a/Data/Libraries/GameLab/Editor/Window/SplitWindow.lua b/Data/Libraries/GameLab/Editor/Window/SplitWindow.lua
index 597e858..9dd6446 100644
--- a/Data/Libraries/GameLab/Editor/Window/SplitWindow.lua
+++ b/Data/Libraries/GameLab/Editor/Window/SplitWindow.lua
@@ -1,5 +1,7 @@
-local Debug = GameLab.Debug
-local Rect = require("GameLab.Engine.Math.Rect")
+local Debug = GameLab.Debug
+local EEventType = GameLab.Events.EEventType
+local Rect = require("GameLab.Engine.Math.Rect")
+local GUI = require("GameLab.Engine.GUI")
local Splitter = GameLab.Class("GameLab.Editor.Window.Internal.Splitter")
@@ -22,21 +24,31 @@ SplitWindow.Ctor = function(self, mode, splitter)
self.m_SubSplit = {} -- 子节点也是split windows
self.m_GUIWindow = {} -- 不包含subSplit的有一个GUIWindow
self.m_Splitter = {}
+ self.m_CurSplitter = nil
self.m_ContainerWindow = nil
if splitter ~= nil and type(splitter) == "table" then
for _, v in ipairs(splitter) do
local sp = Splitter.New(v)
table.insert(self.m_Splitter, sp)
end
- end
+ end
end
-- 布局,设置GUIWindow的大小
SplitWindow.DoSplit = function(self, event)
- -- local position = self:GetPosition()
- -- for _, sp in ipairs(self.m_SubSplit) do
- -- sp:DoSplit(event)
- -- end
+ if self.m_Parent ~= nil then
+ self.m_Parent:DoSplit(event)
+ end
+
+ local id = GUI.GetControlID()
+
+ if event.type == EEventType.MouseDown then
+
+ elseif event.type == EEventType.MouseDrag then
+
+ elseif event.type == EEventType.MouseUp then
+
+ end
end
-- 返回在containerWindow下的像素大小和位置