mirror of
https://github.com/lubosz/overte.git
synced 2025-04-19 08:58:02 +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.Controls 1.4
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtQuick.Dialogs 1.0
|
||||
import QtQuick.Layouts 1.1
|
||||
|
@ -83,6 +84,7 @@ Rectangle {
|
|||
anchors.rightMargin: 12
|
||||
model: resourceListModel
|
||||
spacing: 5
|
||||
interactive: false
|
||||
|
||||
delegate: RowLayout {
|
||||
anchors.left: parent.left
|
||||
|
@ -138,12 +140,25 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
text: assetType
|
||||
font.pointSize: 10
|
||||
ComboBox {
|
||||
id: comboBox
|
||||
|
||||
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 {
|
||||
|
@ -159,7 +174,7 @@ Rectangle {
|
|||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
actions[modelData.name](resource, assetType);
|
||||
actions[modelData.name](resource, comboBox.currentText);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue