2023-04-09 13:35:35 +08:00
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2022-09-14 13:01:10 +08:00
|
|
|
import QtQuick
|
2023-05-19 10:08:36 +08:00
|
|
|
import Fk
|
2022-03-23 19:40:28 +08:00
|
|
|
|
|
|
|
Image {
|
2022-04-30 15:27:56 +08:00
|
|
|
property string value: "unknown"
|
|
|
|
property var options: ["unknown", "loyalist", "rebel", "renegade"]
|
2022-03-23 19:40:28 +08:00
|
|
|
|
2022-04-30 15:27:56 +08:00
|
|
|
id: root
|
2023-08-09 22:25:15 +08:00
|
|
|
source: visible ? SkinBank.getRolePic(value) : ""
|
2022-04-30 15:27:56 +08:00
|
|
|
visible: value != "hidden"
|
2022-03-23 19:40:28 +08:00
|
|
|
|
2022-04-30 15:27:56 +08:00
|
|
|
Image {
|
|
|
|
property string value: "unknown"
|
2022-03-23 19:40:28 +08:00
|
|
|
|
2022-04-30 15:27:56 +08:00
|
|
|
id: assumptionBox
|
|
|
|
source: SkinBank.ROLE_DIR + value
|
2024-04-19 20:50:53 +08:00
|
|
|
visible: root.value == "unknown" && optionPopupBox.visible == false
|
2022-03-23 19:40:28 +08:00
|
|
|
|
2023-03-18 15:34:42 +08:00
|
|
|
TapHandler {
|
|
|
|
onTapped: optionPopupBox.visible = true;
|
2022-03-23 19:40:28 +08:00
|
|
|
}
|
2022-04-30 15:27:56 +08:00
|
|
|
}
|
2022-03-23 19:40:28 +08:00
|
|
|
|
2022-04-30 15:27:56 +08:00
|
|
|
Column {
|
|
|
|
id: optionPopupBox
|
|
|
|
visible: false
|
|
|
|
spacing: 2
|
|
|
|
|
|
|
|
Repeater {
|
|
|
|
model: options
|
|
|
|
|
|
|
|
Image {
|
|
|
|
source: SkinBank.ROLE_DIR + modelData
|
|
|
|
|
2023-03-18 15:34:42 +08:00
|
|
|
TapHandler {
|
|
|
|
onTapped: {
|
2022-04-30 15:27:56 +08:00
|
|
|
optionPopupBox.visible = false;
|
|
|
|
assumptionBox.value = modelData;
|
|
|
|
}
|
2022-03-23 19:40:28 +08:00
|
|
|
}
|
2022-04-30 15:27:56 +08:00
|
|
|
}
|
2022-03-23 19:40:28 +08:00
|
|
|
}
|
2022-04-30 15:27:56 +08:00
|
|
|
}
|
2022-03-23 19:40:28 +08:00
|
|
|
}
|