2022-09-14 05:01:10 +00:00
|
|
|
import QtQuick
|
2022-04-02 07:11:13 +00:00
|
|
|
import ".."
|
|
|
|
|
|
|
|
GraphicsBox {
|
2022-04-30 07:27:56 +00:00
|
|
|
property var options: []
|
|
|
|
property string skill_name: ""
|
|
|
|
property int result
|
2022-04-02 07:11:13 +00:00
|
|
|
|
2022-04-30 07:27:56 +00:00
|
|
|
id: root
|
2022-05-01 10:37:13 +00:00
|
|
|
title.text: Backend.translate("$Choice").arg(Backend.translate(skill_name))
|
2022-04-30 07:27:56 +00:00
|
|
|
width: Math.max(140, body.width + 20)
|
|
|
|
height: body.height + title.height + 20
|
2022-04-02 07:11:13 +00:00
|
|
|
|
2022-04-30 07:27:56 +00:00
|
|
|
Column {
|
|
|
|
id: body
|
|
|
|
x: 10
|
|
|
|
y: title.height + 5
|
|
|
|
spacing: 10
|
2022-04-02 07:11:13 +00:00
|
|
|
|
2022-04-30 07:27:56 +00:00
|
|
|
Repeater {
|
|
|
|
model: options
|
2022-04-02 07:11:13 +00:00
|
|
|
|
2022-04-30 07:27:56 +00:00
|
|
|
MetroButton {
|
2022-05-01 10:37:13 +00:00
|
|
|
text: Backend.translate(modelData)
|
2022-04-30 07:27:56 +00:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2022-04-02 07:11:13 +00:00
|
|
|
|
2022-04-30 07:27:56 +00:00
|
|
|
onClicked: {
|
|
|
|
result = index;
|
|
|
|
root.close();
|
2022-04-02 07:11:13 +00:00
|
|
|
}
|
2022-04-30 07:27:56 +00:00
|
|
|
}
|
2022-04-02 07:11:13 +00:00
|
|
|
}
|
2022-04-30 07:27:56 +00:00
|
|
|
}
|
2022-04-02 07:11:13 +00:00
|
|
|
}
|