mirror of
https://github.com/TangentFoxy/Pop.Box.git
synced 2024-12-15 12:44:20 +00:00
fixed bug with window moveable toggle
This commit is contained in:
parent
619e5fc8ce
commit
f8f9ef53c8
@ -318,7 +318,7 @@ do
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
self.header.mousepressed = function(self, x, y, button)
|
self.header.mousepressed = function(self, x, y, button)
|
||||||
if self.data.moveable and button == pop.constants.left_mouse then
|
if button == pop.constants.left_mouse and self.parent.data.moveable then
|
||||||
local grandparent = self.parent.parent
|
local grandparent = self.parent.parent
|
||||||
table.insert(grandparent.child, table.remove(grandparent.child, grandparent:indexOf(self.parent)))
|
table.insert(grandparent.child, table.remove(grandparent.child, grandparent:indexOf(self.parent)))
|
||||||
selected = true
|
selected = true
|
||||||
|
@ -143,7 +143,7 @@ class window extends element
|
|||||||
return false
|
return false
|
||||||
|
|
||||||
@header.mousepressed = (x, y, button) =>
|
@header.mousepressed = (x, y, button) =>
|
||||||
if @data.moveable and button == pop.constants.left_mouse
|
if button == pop.constants.left_mouse and @parent.data.moveable
|
||||||
grandparent = @parent.parent
|
grandparent = @parent.parent
|
||||||
table.insert grandparent.child, table.remove(grandparent.child, grandparent\indexOf @parent)
|
table.insert grandparent.child, table.remove(grandparent.child, grandparent\indexOf @parent)
|
||||||
selected = true
|
selected = true
|
||||||
|
Loading…
Reference in New Issue
Block a user