mirror of
https://github.com/Qsgs-Fans/FreeKill.git
synced 2024-11-16 03:32:34 +08:00
be03b04ef0
- 修复了虚拟牌点数相加的bug - 修复cleaner出错直接爆炸 - QML的代码将宽度控制到80以内
43 lines
806 B
QML
43 lines
806 B
QML
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
import QtQuick
|
|
import QtQuick.Layouts
|
|
import Fk
|
|
import Fk.Pages
|
|
|
|
GraphicsBox {
|
|
property var options: []
|
|
property var all_options: []
|
|
property string skill_name: ""
|
|
property int result
|
|
|
|
id: root
|
|
title.text: luatr("$Choice").arg(luatr(skill_name))
|
|
width: Math.max(140, body.width + 20)
|
|
height: body.height + title.height + 20
|
|
|
|
GridLayout {
|
|
id: body
|
|
x: 10
|
|
y: title.height + 5
|
|
flow: GridLayout.TopToBottom
|
|
rows: 8
|
|
columnSpacing: 10
|
|
|
|
Repeater {
|
|
model: all_options
|
|
|
|
MetroButton {
|
|
Layout.fillWidth: true
|
|
text: Util.processPrompt(modelData)
|
|
enabled: options.indexOf(modelData) !== -1
|
|
|
|
onClicked: {
|
|
result = index;
|
|
root.close();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|