Bacon2D

ScrollBehavior QML Type

ScrollBehavior is a Behavior that scrolls its content based on horizontalStep and verticalStep properties. More...

Import Statement: import Bacon2D 1.0
Inherits:

Behavior

Detailed Description

It can be used to scroll a ImageLayer or the elements inside a Layer

Game {
    width: 200
    height: 100

    currentScene: Scene {
        id: scene

        anchors.fill: parent

        Layer {
            anchors.fill: parent

            behavior: ScrollBehavior {
                horizontalStep: 2
            }

            Rectangle {
                width: 10
                height: 10
                color: "red"
            }
        }
    }
}