Forums

OverviewV-Play 1 SupportFlickable › Reply To: Flickable

OverviewV-Play 1 SupportFlickable › Reply To: Flickable
#4481

Heini

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.

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