Find the Best Demos and Examples

Check out this quick tour to find the best demos and examples for you, and to see how the Felgo SDK can help you to develop your next app or game!

Forums

OverviewFelgo 2 Support (Qt 5) › Strange Windows Phone MouseArea behaviour

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #9329

    Jan

    I investigated some strange behavior on Windows Phone, that does not persist on Android and iOS. Have a look at the code below.

    Steps to reproduce:

    1.: press and move the gameItem

    2.: accidentally leave the physical screen

    3.: reenter physical screen

    Expected result: Touch action keeps moving the gameItem (as Android and iOS do)

    Actual result: pause function gets triggered

    Found on a Microsoft Lumia 535, if that helps

    Thanks,

    Schiff

     

    Here is the code:

    import QtQuick 2.4
    import Felgo 3.0
    
    Scene {
    	id: gameScene;
    	MouseArea {
    		anchors.fill: parent;
    		onClicked: {
    			pause();
    		}
    	}
    	MultiResolutionImage {
    		id: gameItem
    		source: "xyz.png";
    		anchors.bottom: parent.bottom;
    		x: parent.width/2 - gameItem.width/2;
    		MouseArea {
    			anchors.fill: parent
    			drag.target: gameItem
    			drag.axis: Drag.XAxis
    			drag.minimumX: 0
    			drag.maximumX: gameScene.width - gameItem.width
    		}
    	}
    	function pause() {
    	}
    }

     

Viewing 1 post (of 1 total)

RSS feed for this thread

You must be logged in to reply to this topic.