mirror of
https://github.com/Qsgs-Fans/FreeKill.git
synced 2024-11-16 11:42:45 +08:00
196e92f5d3
* lua端的ob属性根本没同步,同步一下 * [需要C++] 让requestTimer的超时影响到Lua * 修复windows没图标 * qmllint; remove modmaker * 修理了选卡器 * 修理了确定取消消失 * 删除了已经不用的autoPending和respond_play * 修复异常烧条(或许吧) * 修复负数烧条时间,若为负数则无事发生
61 lines
1.3 KiB
QML
61 lines
1.3 KiB
QML
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
import QtQuick
|
|
import QtQuick.Layouts
|
|
import QtQuick.Controls
|
|
import Qt5Compat.GraphicalEffects
|
|
|
|
ColumnLayout {
|
|
id: root
|
|
anchors.fill: parent
|
|
property var extra_data: ({}) // unused
|
|
signal finish()
|
|
property var cards: []
|
|
|
|
Text {
|
|
text: luatr("Handcard selector")
|
|
Layout.fillWidth: true
|
|
horizontalAlignment: Text.AlignHCenter
|
|
font.pixelSize: 18
|
|
color: "#E4D5A0"
|
|
}
|
|
|
|
GridView {
|
|
id: cardsList
|
|
cellWidth: 93 * 0.9 + 4
|
|
cellHeight: 130 * 0.9 + 4
|
|
Layout.preferredWidth: root.width - root.width % 88
|
|
Layout.fillHeight: true
|
|
Layout.alignment: Qt.AlignHCenter
|
|
clip: true
|
|
|
|
model: cards
|
|
|
|
delegate: CardItem {
|
|
width: 93 * 0.9
|
|
height: 130 * 0.9
|
|
chosenInBox: modelData.chosen
|
|
onClicked: {
|
|
const clist = roomScene.dashboard.handcardArea.cards;
|
|
for (let cd of clist) {
|
|
if (cd.cid == cid) {
|
|
cd.selected = !cd.selected;
|
|
cd.clicked(cd);
|
|
finish();
|
|
}
|
|
}
|
|
}
|
|
Component.onCompleted: {
|
|
setData(lcall("GetCardData", modelData.cid));
|
|
}
|
|
}
|
|
}
|
|
|
|
Component.onCompleted: {
|
|
cards = roomScene.dashboard.handcardArea.cards
|
|
.filter(c => c.selectable)
|
|
.map(c => { return { cid: c.cid, chosen: c.selected }; });
|
|
}
|
|
}
|
|
|