mirror of
https://github.com/overte-org/overte.git
synced 2025-07-23 10:23:59 +02:00
Allow user to select asset type in marketplace item tester
This commit is contained in:
parent
c1cc031bd0
commit
f9c25f2f32
1 changed files with 21 additions and 6 deletions
|
@ -12,6 +12,7 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
|
import QtQuick.Controls 1.4
|
||||||
import QtQuick.Controls.Styles 1.4
|
import QtQuick.Controls.Styles 1.4
|
||||||
import QtQuick.Dialogs 1.0
|
import QtQuick.Dialogs 1.0
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
|
@ -83,6 +84,7 @@ Rectangle {
|
||||||
anchors.rightMargin: 12
|
anchors.rightMargin: 12
|
||||||
model: resourceListModel
|
model: resourceListModel
|
||||||
spacing: 5
|
spacing: 5
|
||||||
|
interactive: false
|
||||||
|
|
||||||
delegate: RowLayout {
|
delegate: RowLayout {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
@ -138,12 +140,25 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
ComboBox {
|
||||||
text: assetType
|
id: comboBox
|
||||||
font.pointSize: 10
|
|
||||||
Layout.preferredWidth: root.width * .2
|
Layout.preferredWidth: root.width * .2
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
model: [
|
||||||
|
"application",
|
||||||
|
"avatar",
|
||||||
|
"content set",
|
||||||
|
"entity",
|
||||||
|
"wearable",
|
||||||
|
"unknown"
|
||||||
|
]
|
||||||
|
|
||||||
|
currentIndex: ("entity or wearable" == assetType) ? model.indexOf("unknown") : model.indexOf(assetType)
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
onActivated.connect(function() { assetType = currentText; });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
|
@ -159,7 +174,7 @@ Rectangle {
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: {
|
onClicked: {
|
||||||
actions[modelData.name](resource, assetType);
|
actions[modelData.name](resource, comboBox.currentText);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue