Fixed a bug with circle buttons overlap
This commit is contained in:
@@ -191,10 +191,13 @@ class FunkinButton extends FunkinSprite implements IFlxInput
|
||||
if (overlapsPoint(worldPos, true, camera))
|
||||
{
|
||||
touchID = touch.touchPointID;
|
||||
var prevButton = buttonsTouchID.get(touchID);
|
||||
if (prevButton != null && prevButton != this && !prevButton.limitToBounds)
|
||||
if (buttonsTouchID.exists(touchID) && buttonsTouchID.get(touchID) != this)
|
||||
{
|
||||
prevButton.onOutHandler();
|
||||
var prevButton = buttonsTouchID.get(touchID);
|
||||
if (prevButton.status == FunkinButtonStatus.PRESSED && prevButton != null && !prevButton.limitToBounds)
|
||||
{
|
||||
prevButton.onOutHandler();
|
||||
}
|
||||
}
|
||||
buttonsTouchID.set(touchID, this);
|
||||
|
||||
|
||||
@@ -76,10 +76,10 @@ class FunkinPolygonButton extends FunkinButton
|
||||
@:noCompletion
|
||||
private override function checkTouchOverlap(?touch:FlxTouch):Bool
|
||||
{
|
||||
var touches = touch == null ? FlxG.touches.list : [touch];
|
||||
for (touch in touches)
|
||||
if (polygon != null && polygon.length >= 6 && polygon.length % 2 == 0)
|
||||
{
|
||||
if (polygon != null && polygon.length >= 6 && polygon.length % 2 == 0)
|
||||
var touches = touch == null ? FlxG.touches.list : [touch];
|
||||
for (touch in touches)
|
||||
{
|
||||
for (camera in cameras)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user