2019-02-15 15:47:04 +01:00
|
|
|
import QtQuick 2.9
|
|
|
|
import QtQuick.Controls 2.4
|
2019-02-17 13:57:57 +01:00
|
|
|
import QtGraphicalEffects 1.0
|
2019-02-17 15:13:00 +01:00
|
|
|
import "./components"
|
2019-02-15 15:47:04 +01:00
|
|
|
|
|
|
|
Popup {
|
|
|
|
id: control
|
|
|
|
|
|
|
|
modal: true
|
2019-02-17 13:57:57 +01:00
|
|
|
dim: false
|
|
|
|
|
|
|
|
scale: 0
|
2019-02-15 15:47:04 +01:00
|
|
|
|
|
|
|
height: 300
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
id: contentRect
|
|
|
|
|
|
|
|
height: parent.height
|
|
|
|
|
|
|
|
width: topImg.width * 0.836
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
|
|
|
color: "white"
|
|
|
|
|
2019-02-17 13:57:57 +01:00
|
|
|
Item {
|
|
|
|
id: contentItm
|
|
|
|
|
|
|
|
anchors {
|
|
|
|
fill: parent
|
|
|
|
topMargin: -topImg.anchors.bottomMargin
|
|
|
|
}
|
|
|
|
|
2019-03-23 09:36:50 +01:00
|
|
|
ListView {
|
2019-02-17 13:57:57 +01:00
|
|
|
anchors.fill: parent
|
|
|
|
|
2019-03-23 09:36:50 +01:00
|
|
|
model: ListModel {
|
|
|
|
ListElement {
|
|
|
|
iconSource: "qrc:/icons/cookie.png"
|
|
|
|
costIconSource: "qrc:/icons/cookie.png"
|
|
|
|
title: "Titel"
|
|
|
|
cost: "10"
|
|
|
|
levelLabel: "Level:"
|
|
|
|
level: "10"
|
|
|
|
useLabel: "Cps:"
|
|
|
|
use: "+10"
|
|
|
|
}
|
|
|
|
ListElement {
|
|
|
|
iconSource: "qrc:/icons/cookie.png"
|
|
|
|
costIconSource: "qrc:/icons/cookie.png"
|
|
|
|
title: "Titel2"
|
|
|
|
cost: "100"
|
|
|
|
levelLabel: "Level:"
|
|
|
|
level: "10"
|
|
|
|
useLabel: "Cps:"
|
|
|
|
use: "+10"
|
|
|
|
}
|
|
|
|
ListElement {
|
|
|
|
iconSource: "qrc:/icons/cookie.png"
|
|
|
|
costIconSource: "qrc:/icons/cookie.png"
|
|
|
|
title: "Titel3"
|
|
|
|
cost: "1000"
|
|
|
|
levelLabel: "Level:"
|
|
|
|
level: "10"
|
|
|
|
useLabel: "Cps:"
|
|
|
|
use: "+10"
|
|
|
|
}
|
2019-02-17 13:57:57 +01:00
|
|
|
}
|
2019-02-17 15:13:00 +01:00
|
|
|
|
2019-03-23 09:36:50 +01:00
|
|
|
delegate: ShopDelegate {
|
|
|
|
iconSource: model.iconSource
|
|
|
|
costIconSource: model.costIconSource
|
|
|
|
title: model.title
|
|
|
|
cost: model.cost
|
|
|
|
levelLabel: model.levelLabel
|
|
|
|
level: model.level
|
|
|
|
useLabel: model.useLabel
|
|
|
|
use: model.use
|
|
|
|
}
|
2019-02-17 13:57:57 +01:00
|
|
|
}
|
|
|
|
}
|
2019-02-15 15:47:04 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
Image {
|
|
|
|
id: topImg
|
|
|
|
|
|
|
|
anchors {
|
|
|
|
bottom: contentRect.top
|
|
|
|
bottomMargin: -height * 0.22
|
|
|
|
}
|
2019-02-17 13:57:57 +01:00
|
|
|
|
2019-02-15 15:47:04 +01:00
|
|
|
source: "qrc:/graphics/shopTop.png"
|
|
|
|
fillMode: Image.PreserveAspectFit
|
2019-02-17 13:57:57 +01:00
|
|
|
mipmap: true
|
2019-02-15 15:47:04 +01:00
|
|
|
width: parent.width
|
|
|
|
}
|
|
|
|
|
|
|
|
Image {
|
|
|
|
id: bottomImg
|
|
|
|
|
|
|
|
anchors {
|
|
|
|
top: contentRect.bottom
|
|
|
|
topMargin: -height * 0.33
|
|
|
|
}
|
|
|
|
|
|
|
|
source: "qrc:/graphics/shopBottom.png"
|
|
|
|
fillMode: Image.PreserveAspectFit
|
2019-02-17 13:57:57 +01:00
|
|
|
mipmap: true
|
2019-02-15 15:47:04 +01:00
|
|
|
width: parent.width
|
|
|
|
}
|
|
|
|
|
|
|
|
background: Rectangle {
|
|
|
|
color: "transparent"
|
|
|
|
}
|
|
|
|
|
2019-02-17 13:57:57 +01:00
|
|
|
enter: Transition {
|
|
|
|
NumberAnimation { properties: "scale"; to: 1; duration: 300; easing.type: Easing.Linear }
|
|
|
|
}
|
2019-02-15 15:47:04 +01:00
|
|
|
|
2019-02-17 13:57:57 +01:00
|
|
|
exit: Transition {
|
|
|
|
NumberAnimation { properties: "scale"; to: 0; duration: 300; easing.type: Easing.Linear }
|
|
|
|
}
|
2019-02-15 15:47:04 +01:00
|
|
|
}
|