2022-09-14 05:01:10 +00:00
|
|
|
import QtQuick
|
2022-03-23 11:40:28 +00:00
|
|
|
import "../../skin-bank.js" as SkinBank
|
|
|
|
|
|
|
|
Image {
|
2022-04-30 07:27:56 +00:00
|
|
|
property string value: "unknown"
|
|
|
|
property var options: ["unknown", "loyalist", "rebel", "renegade"]
|
2022-03-23 11:40:28 +00:00
|
|
|
|
2022-04-30 07:27:56 +00:00
|
|
|
id: root
|
|
|
|
source: visible ? SkinBank.ROLE_DIR + value : ""
|
|
|
|
visible: value != "hidden"
|
2022-03-23 11:40:28 +00:00
|
|
|
|
2022-04-30 07:27:56 +00:00
|
|
|
Image {
|
|
|
|
property string value: "unknown"
|
2022-03-23 11:40:28 +00:00
|
|
|
|
2022-04-30 07:27:56 +00:00
|
|
|
id: assumptionBox
|
|
|
|
source: SkinBank.ROLE_DIR + value
|
|
|
|
visible: root.value == "unknown"
|
2022-03-23 11:40:28 +00:00
|
|
|
|
2022-04-30 07:27:56 +00:00
|
|
|
MouseArea {
|
|
|
|
anchors.fill: parent
|
|
|
|
onClicked: optionPopupBox.visible = true;
|
2022-03-23 11:40:28 +00:00
|
|
|
}
|
2022-04-30 07:27:56 +00:00
|
|
|
}
|
2022-03-23 11:40:28 +00:00
|
|
|
|
2022-04-30 07:27:56 +00:00
|
|
|
Column {
|
|
|
|
id: optionPopupBox
|
|
|
|
visible: false
|
|
|
|
spacing: 2
|
|
|
|
|
|
|
|
Repeater {
|
|
|
|
model: options
|
|
|
|
|
|
|
|
Image {
|
|
|
|
source: SkinBank.ROLE_DIR + modelData
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
anchors.fill: parent
|
|
|
|
onClicked: {
|
|
|
|
optionPopupBox.visible = false;
|
|
|
|
assumptionBox.value = modelData;
|
|
|
|
}
|
2022-03-23 11:40:28 +00:00
|
|
|
}
|
2022-04-30 07:27:56 +00:00
|
|
|
}
|
2022-03-23 11:40:28 +00:00
|
|
|
}
|
2022-04-30 07:27:56 +00:00
|
|
|
}
|
2022-03-23 11:40:28 +00:00
|
|
|
}
|