Small 1.6 fixes
- added basalt.forceRenderUpdate - fixed dropdowns behaving wrong on monitors
This commit is contained in:
@@ -885,20 +885,20 @@ return function(name, parent, pTerm, basalt)
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
mouseHandler = function(self, button, x, y, _, side)
|
mouseHandler = function(self, button, x, y, touch, side)
|
||||||
if(isGroupedMonitor)then
|
if(isGroupedMonitor)then
|
||||||
if(termObject.calculateClick~=nil)then
|
if(termObject.calculateClick~=nil)then
|
||||||
x, y = termObject.calculateClick(side, x, y)
|
x, y = termObject.calculateClick(side, x, y)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if(base.mouseHandler(self, button, x, y))then
|
if(base.mouseHandler(self, button, x, y, touch))then
|
||||||
if(events["mouse_click"]~=nil)then
|
if(events["mouse_click"]~=nil)then
|
||||||
self:setCursor(false)
|
self:setCursor(false)
|
||||||
for _, index in ipairs(eventZIndex["mouse_click"]) do
|
for _, index in ipairs(eventZIndex["mouse_click"]) do
|
||||||
if (events["mouse_click"][index] ~= nil) then
|
if (events["mouse_click"][index] ~= nil) then
|
||||||
for _, value in rpairs(events["mouse_click"][index]) do
|
for _, value in rpairs(events["mouse_click"][index]) do
|
||||||
if (value.mouseHandler ~= nil) then
|
if (value.mouseHandler ~= nil) then
|
||||||
if (value:mouseHandler(button, x, y)) then
|
if (value:mouseHandler(button, x, y, touch)) then
|
||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -436,6 +436,10 @@ basalt = {
|
|||||||
projectDirectory = dir
|
projectDirectory = dir
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
forceRenderUpdate = function()
|
||||||
|
drawFrames()
|
||||||
|
end,
|
||||||
|
|
||||||
debug = function(...)
|
debug = function(...)
|
||||||
local args = { ... }
|
local args = { ... }
|
||||||
if(mainFrame==nil)then print(...) return end
|
if(mainFrame==nil)then print(...) return end
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ return function(name)
|
|||||||
return dropdownW, dropdownH
|
return dropdownW, dropdownH
|
||||||
end,
|
end,
|
||||||
|
|
||||||
mouseHandler = function(self, button, x, y)
|
mouseHandler = function(self, button, x, y, touch)
|
||||||
if (isOpened) then
|
if (isOpened) then
|
||||||
local obx, oby = self:getAbsolutePosition(self:getAnchorPosition())
|
local obx, oby = self:getAbsolutePosition(self:getAnchorPosition())
|
||||||
if(button==1)then
|
if(button==1)then
|
||||||
@@ -135,6 +135,9 @@ return function(name)
|
|||||||
self:setValue(list[n + yOffset])
|
self:setValue(list[n + yOffset])
|
||||||
self:updateDraw()
|
self:updateDraw()
|
||||||
local val = self:getEventSystem():sendEvent("mouse_click", self, "mouse_click", dir, x, y)
|
local val = self:getEventSystem():sendEvent("mouse_click", self, "mouse_click", dir, x, y)
|
||||||
|
if(touch)then
|
||||||
|
self:mouseUpHandler(button, x, y)
|
||||||
|
end
|
||||||
if(val==false)then return val end
|
if(val==false)then return val end
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user