Forums

OverviewV-Play 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 VPlay 2.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.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support