Here is some of the flickable code:
Flickable{
id: flickOriginal
height: level1.height - menu.height
width: height
x: 0 - anchors.rightMargin
anchors.rightMargin: 2
clip: true
Image{
id: original
source: "Levels/Original1.JPG"
height: level1.height - menu.height
width: 500 * scalefactor
x: 0 - anchors.rightMargin
anchors.rightMargin: 2
MouseArea{
id: mouseareaOriginal
anchors.fill: parent
onPressed: {
if (isLupeEnabled)
{
//Verhältnis zwischen Bildgroesse und Mouseposition berechnen
var mouseRatioX = mouseX / original.width
var mouseRatioY = mouseY / original.height
zoomIn (mouseRatioX, mouseRatioY);
}
}
}
}
}
}
There is a zoom-button in the game menu. After activating it, the player has to touch the point in the flickable, he wants to zoom in.