mirror of
https://github.com/Qsgs-Fans/FreeKill.git
synced 2024-11-16 19:58:13 +08:00
d2315c7533
* create Photo * Room layout, img, debug
48 lines
1.0 KiB
QML
48 lines
1.0 KiB
QML
|
|
import QtQuick 2.15
|
|
import "../../skin-bank.js" as SkinBank
|
|
|
|
Image {
|
|
property string value: "unknown"
|
|
property var options: ["unknown", "loyalist", "rebel", "renegade"]
|
|
|
|
id: root
|
|
source: visible ? SkinBank.ROLE_DIR + value : ""
|
|
visible: value != "hidden"
|
|
|
|
Image {
|
|
property string value: "unknown"
|
|
|
|
id: assumptionBox
|
|
source: SkinBank.ROLE_DIR + value
|
|
visible: root.value == "unknown"
|
|
|
|
MouseArea {
|
|
anchors.fill: parent
|
|
onClicked: optionPopupBox.visible = true;
|
|
}
|
|
}
|
|
|
|
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;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|