mirror of
https://github.com/TangentFoxy/Pop.Box.git
synced 2024-12-15 12:44:20 +00:00
fix derp mistake in earlier modification
This commit is contained in:
parent
ceb4faabd4
commit
107538b18f
@ -426,7 +426,7 @@
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
|
||||
<i style="float:right;">Last updated 2017-04-11 01:22:59 </i>
|
||||
<i style="float:right;">Last updated 2017-04-11 08:56:04 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
@ -144,7 +144,7 @@
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
|
||||
<i style="float:right;">Last updated 2017-04-11 01:22:59 </i>
|
||||
<i style="float:right;">Last updated 2017-04-11 08:56:04 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
@ -84,7 +84,7 @@
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
|
||||
<i style="float:right;">Last updated 2017-04-11 01:22:59 </i>
|
||||
<i style="float:right;">Last updated 2017-04-11 08:56:04 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
@ -491,7 +491,7 @@
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
|
||||
<i style="float:right;">Last updated 2017-04-11 01:22:59 </i>
|
||||
<i style="float:right;">Last updated 2017-04-11 08:56:04 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
@ -105,7 +105,7 @@
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
|
||||
<i style="float:right;">Last updated 2017-04-11 01:22:59 </i>
|
||||
<i style="float:right;">Last updated 2017-04-11 08:56:04 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
@ -723,7 +723,7 @@ table.insert element.parent, element.parent\removeChild(element),
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
|
||||
<i style="float:right;">Last updated 2017-04-11 01:22:59 </i>
|
||||
<i style="float:right;">Last updated 2017-04-11 08:56:04 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
@ -126,7 +126,7 @@
|
||||
</div> <!-- id="main" -->
|
||||
<div id="about">
|
||||
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
|
||||
<i style="float:right;">Last updated 2017-04-11 01:22:59 </i>
|
||||
<i style="float:right;">Last updated 2017-04-11 08:56:04 </i>
|
||||
</div> <!-- id="about" -->
|
||||
</div> <!-- id="container" -->
|
||||
</body>
|
||||
|
6
init.lua
6
init.lua
@ -215,7 +215,7 @@ pop.mousemoved = function(x, y, dx, dy, element)
|
||||
end
|
||||
if element.data.draw and (x >= element.data.x) and (x <= element.data.x + element.data.w) and (y >= element.data.y) and (y <= element.data.y + element.data.h) then
|
||||
pop.hovered = element
|
||||
for i = 1, #element.child do
|
||||
for i = #element.child, 1, -1 do
|
||||
pop.mousemoved(x, y, dx, dy, element.child[i])
|
||||
end
|
||||
end
|
||||
@ -231,7 +231,7 @@ pop.mousepressed = function(x, y, button, element)
|
||||
end
|
||||
local handled = false
|
||||
if element.data.draw and (x >= element.data.x) and (x <= element.data.x + element.data.w) and (y >= element.data.y) and (y <= element.data.y + element.data.h) then
|
||||
for i = 1, #element.child do
|
||||
for i = #element.child, 1, -1 do
|
||||
do
|
||||
handled = pop.mousepressed(x, y, button, element.child[i])
|
||||
if handled then
|
||||
@ -257,7 +257,7 @@ pop.mousereleased = function(x, y, button, element)
|
||||
local mousereleasedHandled = false
|
||||
if element then
|
||||
if element.data.draw and (x >= element.data.x) and (x <= element.data.x + element.data.w) and (y >= element.data.y) and (y <= element.data.y + element.data.h) then
|
||||
for i = 1, #element.child do
|
||||
for i = #element.child, 1, -1 do
|
||||
clickedHandled, mousereleasedHandled = pop.mousereleased(x, y, button, element.child[i])
|
||||
if clickedHandled or mousereleasedHandled then
|
||||
return clickedHandled, mousereleasedHandled
|
||||
|
@ -271,7 +271,7 @@ pop.mousemoved = (x, y, dx, dy, element=pop.screen) ->
|
||||
-- okay, we're over this element for sure, but let's check its children
|
||||
pop.hovered = element
|
||||
-- check in reverse order, it will set pop.hovered to any that match
|
||||
for i = 1, #element.child
|
||||
for i = #element.child, 1, -1
|
||||
pop.mousemoved x, y, dx, dy, element.child[i]
|
||||
|
||||
--- @todo Implement a way for an element to attach itself to `love.mousemoved()` events?
|
||||
@ -306,7 +306,7 @@ pop.mousepressed = (x, y, button, element) ->
|
||||
-- if it is inside the current element..
|
||||
if element.data.draw and (x >= element.data.x) and (x <= element.data.x + element.data.w) and (y >= element.data.y) and (y <= element.data.y + element.data.h)
|
||||
-- check its child elements in reverse order, returning if something handles it
|
||||
for i = 1, #element.child
|
||||
for i = #element.child, 1, -1
|
||||
if handled = pop.mousepressed x, y, button, element.child[i]
|
||||
return handled
|
||||
|
||||
@ -343,7 +343,7 @@ pop.mousereleased = (x, y, button, element) ->
|
||||
if element
|
||||
if element.data.draw and (x >= element.data.x) and (x <= element.data.x + element.data.w) and (y >= element.data.y) and (y <= element.data.y + element.data.h)
|
||||
-- check its children in reverse for handling a clicked or mousereleased event
|
||||
for i = 1, #element.child
|
||||
for i = #element.child, 1, -1
|
||||
clickedHandled, mousereleasedHandled = pop.mousereleased x, y, button, element.child[i]
|
||||
if clickedHandled or mousereleasedHandled
|
||||
return clickedHandled, mousereleasedHandled
|
||||
|
Loading…
Reference in New Issue
Block a user