mirror of
https://github.com/TangentFoxy/Pop.Box.git
synced 2024-12-15 12:44:20 +00:00
fix #67 using 2 spaces instead of 4
This commit is contained in:
parent
c33f10c18e
commit
e8a76ddaf2
@ -68,7 +68,7 @@ elseif major == 0 and minor == 10
|
|||||||
right_mouse: 2
|
right_mouse: 2
|
||||||
button_4: 4
|
button_4: 4
|
||||||
button_5: 5
|
button_5: 5
|
||||||
--no mouse wheel, may lead to problems?
|
-- no mouse wheel, may lead to problems?
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
pop.constants = {} -- this would be an unsupported version currently
|
pop.constants = {} -- this would be an unsupported version currently
|
||||||
@ -228,7 +228,7 @@ pop.create = (element, parent=pop.screen, data, ...) ->
|
|||||||
insert parent.data.child, element.data
|
insert parent.data.child, element.data
|
||||||
element.parent = parent
|
element.parent = parent
|
||||||
element.data.parent = parent.data
|
element.data.parent = parent.data
|
||||||
-- if explicitly no parent, just create the element
|
-- if explicitly no parent, just create the element
|
||||||
elseif parent == false
|
elseif parent == false
|
||||||
if type(data) == "table"
|
if type(data) == "table"
|
||||||
element = pop.elements[element](false, data, ...)
|
element = pop.elements[element](false, data, ...)
|
||||||
@ -437,6 +437,7 @@ pop.mousereleased = (x, y, button, element) ->
|
|||||||
clickedHandled = element\clicked x - element.data.x, y - element.data.y, button
|
clickedHandled = element\clicked x - element.data.x, y - element.data.y, button
|
||||||
if clickedHandled != false
|
if clickedHandled != false
|
||||||
log " #{clickedHandled} (click handled)", "#{element} (#{element.data.type})"
|
log " #{clickedHandled} (click handled)", "#{element} (#{element.data.type})"
|
||||||
|
|
||||||
-- a focused element needs to know when it has been released no matter what!
|
-- a focused element needs to know when it has been released no matter what!
|
||||||
if element.mousereleased
|
if element.mousereleased
|
||||||
mousereleasedHandled = element\mousereleased x - element.data.x, y - element.data.y, button
|
mousereleasedHandled = element\mousereleased x - element.data.x, y - element.data.y, button
|
||||||
@ -447,7 +448,7 @@ pop.mousereleased = (x, y, button, element) ->
|
|||||||
|
|
||||||
pop.mousereleased x, y, button, pop.screen
|
pop.mousereleased x, y, button, pop.screen
|
||||||
|
|
||||||
--print "#{clickedHandled}, #{mousereleasedHandled}, #{element}"
|
-- print "#{clickedHandled}, #{mousereleasedHandled}, #{element}"
|
||||||
|
|
||||||
return clickedHandled, mousereleasedHandled
|
return clickedHandled, mousereleasedHandled
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user