Introducing cbAmmo qmlfrontend
authorunc0rr
Mon, 16 Feb 2015 22:33:15 +0300
branchqmlfrontend
changeset 10823 1ff3dd3705b1
parent 10821 efb861d1489e
child 10886 99273b7afbff
Introducing cbAmmo
qmlFrontend/qml/qmlFrontend/GameConfig.qml
--- a/qmlFrontend/qml/qmlFrontend/GameConfig.qml	Mon Feb 09 00:37:59 2015 +0300
+++ b/qmlFrontend/qml/qmlFrontend/GameConfig.qml	Mon Feb 16 22:33:15 2015 +0300
@@ -134,6 +134,38 @@
     }
 
 
+    HWComboBox {
+        id: cbAmmo
+        x: 50
+        y: 416
+        width: 256
+        height: 64
+
+        model: ammoModel
+        delegate: Rectangle {
+            height: 25
+            width: 100
+            color: "transparent"
+
+            property string itemIconSource: ""
+            property alias itemText: ammoName.text
+
+            Row {
+                //Image {id: themeIcon; width: height; height: parent.height; source: "image://theme/" + modelData}
+                Text {id: ammoName; text: modelData }
+            }
+
+            MouseArea {
+                 z: 1
+                 anchors.fill: parent
+                 onClicked: {
+                     cbAmmo.currentIndex = index
+                     HWEngine.setAmmo(ammoName.text)
+                 }
+            }
+        }
+    }
+
     ListView {
         id: playingTeamsList
         x: 440