Forums

OverviewV-Play 1 SupportMultitouchArea only 2 points › Reply To: MultitouchArea only 2 points

OverviewV-Play 1 SupportMultitouchArea only 2 points › Reply To: MultitouchArea only 2 points
#5110

Alex
V-Play Team

Hi,

i took your code and made a little test project. When testing on our Nexus 7, all 4 MultiTouchAreas were working fine. Please test this code on your device and tell me if it works.

main.qml

import VPlay 1.0
import QtQuick 1.1

GameWindow {
  Scene {
    id: scene

    Player {x: 50; y: 50}

    Player {x: 200; y: 50}

    Player {x: 50; y: 200}

    Player {x: 200; y: 200}
  }
}

Player.qml

import VPlay 1.0
import QtQuick 1.1

EntityBase {
  width: 100
  height: 100

  Rectangle {
    id: rectangle
    anchors.fill: parent
    color: "red"
  }

  MultiTouchArea {
    id: mouse
    anchors.fill: parent

    multiTouch.target: parent
    multiTouch.dragAxis: MultiTouch.YAxis
    multiTouch.maximumY: scene.height-parent.height
    multiTouch.minimumY: 0

    onPressed: rectangle.color = "blue"
    onReleased: rectangle.color = "red"
  }
}

Cheers, Alex

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