diff --git a/objects/tabs.lua b/objects/tabs.lua index f16b8c1..dfc6265 100644 --- a/objects/tabs.lua +++ b/objects/tabs.lua @@ -138,16 +138,44 @@ function tabs:mousepressed(x, y, button) return end - if self.hover == true and button == "l" then - - local baseparent = self:GetBaseParent() + if self.hover == true then - if baseparent and baseparent.type == "frame" then - baseparent:MakeTop() + if button == "l" then + + local baseparent = self:GetBaseParent() + + if baseparent and baseparent.type == "frame" then + baseparent:MakeTop() + end + end end + if button == "wu" then + + local buttonheight = self:GetHeightOfButtons() + local col = loveframes.util.BoundingBox(self.x, x, self.y, y, self.width, 1, buttonheight, 1) + local visible = self.internals[#self.internals - 1]:GetVisible() + + if col == true and visible == true then + self.offsetx = self.offsetx + 5 + end + + end + + if button == "wd" then + + local buttonheight = self:GetHeightOfButtons() + local col = loveframes.util.BoundingBox(self.x, x, self.y, y, self.width, 1, buttonheight, 1) + local visible = self.internals[#self.internals]:GetVisible() + + if col == true and visible == true then + self.offsetx = self.offsetx - 5 + end + + end + for k, v in ipairs(self.internals) do v:mousepressed(x, y, button) end diff --git a/util.lua b/util.lua index cb88c5a..a04cbee 100644 --- a/util.lua +++ b/util.lua @@ -6,6 +6,20 @@ -- util library loveframes.util = {} +--[[--------------------------------------------------------- + - func: SetActiveSkin(name) + - desc: sets the active skin +--]]--------------------------------------------------------- +function loveframes.util.SetActiveSkin(name) + + loveframes.config["ACTIVESKIN"] = name + +end + +--[[--------------------------------------------------------- + - func: GetActiveSkin() + - desc: gets the active skin +--]]--------------------------------------------------------- function loveframes.util.GetActiveSkin() local index = loveframes.config["ACTIVESKIN"]