2023-02-21 05:44:24 +00:00
|
|
|
import QtQuick
|
2023-04-04 08:25:37 +00:00
|
|
|
import QtQuick.Layouts
|
|
|
|
import QtQuick.Controls
|
|
|
|
import Qt5Compat.GraphicalEffects
|
2023-02-21 05:44:24 +00:00
|
|
|
|
|
|
|
Item {
|
|
|
|
id: root
|
|
|
|
anchors.fill: parent
|
|
|
|
property var extra_data: ({})
|
|
|
|
signal finish()
|
|
|
|
|
2023-04-04 08:25:37 +00:00
|
|
|
Rectangle {
|
2023-02-21 05:44:24 +00:00
|
|
|
anchors.fill: parent
|
2023-04-04 08:25:37 +00:00
|
|
|
color: "black"
|
|
|
|
|
|
|
|
GlowText {
|
|
|
|
id: pileName
|
|
|
|
text: Backend.translate(extra_data.name)
|
|
|
|
width: parent.width
|
|
|
|
anchors.topMargin: 10
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
font.family: fontLibian.name
|
|
|
|
color: "#E4D5A0"
|
|
|
|
font.pixelSize: 30
|
|
|
|
font.weight: Font.Medium
|
|
|
|
glow.color: "black"
|
|
|
|
glow.spread: 0.3
|
|
|
|
glow.radius: 5
|
|
|
|
}
|
|
|
|
|
|
|
|
LinearGradient {
|
|
|
|
anchors.fill: pileName
|
|
|
|
source: pileName
|
|
|
|
gradient: Gradient {
|
|
|
|
GradientStop {
|
|
|
|
position: 0
|
|
|
|
color: "#FEF7C2"
|
|
|
|
}
|
|
|
|
|
|
|
|
GradientStop {
|
|
|
|
position: 0.5
|
|
|
|
color: "#D2AD4A"
|
|
|
|
}
|
|
|
|
|
|
|
|
GradientStop {
|
|
|
|
position: 1
|
|
|
|
color: "#BE9878"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Flickable {
|
|
|
|
id: flickableContainer
|
|
|
|
ScrollBar.vertical: ScrollBar {}
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: 40
|
|
|
|
flickableDirection: Flickable.VerticalFlick
|
|
|
|
width: parent.width - 20
|
|
|
|
height: parent.height - 40
|
|
|
|
contentWidth: cardsList.width
|
|
|
|
contentHeight: cardsList.height
|
|
|
|
clip: true
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
id: cardsList
|
|
|
|
|
|
|
|
GridLayout {
|
|
|
|
columns: 4
|
|
|
|
|
|
|
|
Repeater {
|
|
|
|
model: extra_data.ids
|
|
|
|
|
|
|
|
CardItem {
|
|
|
|
id: cardItem
|
|
|
|
width: (flickableContainer.width - 15) / 4
|
|
|
|
height: cardItem.width * 1.4
|
|
|
|
autoBack: false
|
|
|
|
Component.onCompleted: {
|
|
|
|
let data = JSON.parse(Backend.callLuaFunction("GetCardData", [modelData]));
|
|
|
|
setData(data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-02-21 05:44:24 +00:00
|
|
|
}
|
|
|
|
}
|