2023-04-09 05:35:35 +00:00
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
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
|
|
|
|
2023-03-18 07:34:42 +00:00
|
|
|
TapHandler {
|
|
|
|
onTapped: 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
|
|
|
|
|
2023-03-18 07:34:42 +00:00
|
|
|
TapHandler {
|
|
|
|
onTapped: {
|
2022-04-30 07:27:56 +00:00
|
|
|
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
|
|
|
}
|