diff --git a/Basalt/objects/Dropdown.lua b/Basalt/objects/Dropdown.lua index 61019a0..613e2a6 100644 --- a/Basalt/objects/Dropdown.lua +++ b/Basalt/objects/Dropdown.lua @@ -98,7 +98,7 @@ return function(name, basalt) if (obx <= x) and (obx + dropdownW > x) and (oby + n == y) then self:setValue(list[n + yOffset]) self:updateDraw() - local val = self:sendEvent("mouse_click", self, "mouse_click", dir, x, y) + local val = self:sendEvent("mouse_click", self, "mouse_click", button, x, y) if(val==false)then return val end if(isMon)then basalt.schedule(function() @@ -139,7 +139,7 @@ return function(name, basalt) if (obx <= x) and (obx + dropdownW > x) and (oby + n == y) then isOpened = false self:updateDraw() - local val = self:sendEvent("mouse_up", self, "mouse_up", dir, x, y) + local val = self:sendEvent("mouse_up", self, "mouse_up", button, x, y) if(val==false)then return val end return true end @@ -150,6 +150,12 @@ return function(name, basalt) end end, + dragHandler = function(self, btn, x, y) + if(base.dragHandler(self, btn, x, y))then + isOpened = true + end + end, + scrollHandler = function(self, dir, x, y) if(isOpened)then local xPos, yPos = self:getAbsolutePosition() diff --git a/Basalt/objects/MovableFrame.lua b/Basalt/objects/MovableFrame.lua index f67dc39..874c702 100644 --- a/Basalt/objects/MovableFrame.lua +++ b/Basalt/objects/MovableFrame.lua @@ -5,7 +5,7 @@ return function(name, basalt) local objectType = "MovableFrame" local parent - local dragXOffset, dragYOffset = 0, 0 + local dragXOffset, dragYOffset, isDragging = 0, 0, false local dragMap = { {x1 = 1, x2 = "width", y1 = 1, y2 = 1}