mirror of
https://github.com/Qsgs-Fans/FreeKill.git
synced 2024-11-16 19:58:13 +08:00
162b3af505
* distance & snatch * distance & snatch - clean * fix: client.alive_players * room:askForCardChosen(todo: snatch) * add skill to players(uncomplete) * ui of skill btn * expand pile(not completed) * Use card2 (#23) * snatch (todo: owner_map) * owner_map * remove too many snatch * update * call active skill's functions * use zhiheng * Qt6 (#24) * use qt6 * android compiling * remove version number of qml import * correct anti-sql injection; update deprecated code * add fkparse as submodule * link fkparse, and write simple functions * adjust ui * adjust layout for photos; fix qml warning * android problem fix (partially) * move ico * update copy_assets * update logic for ok/cancel btn
53 lines
1.1 KiB
QML
53 lines
1.1 KiB
QML
import QtQuick
|
|
import QtQuick.Layouts
|
|
import QtQuick.Controls
|
|
import "RoomElement"
|
|
|
|
Item {
|
|
id: root
|
|
|
|
property bool loaded: false
|
|
|
|
ListView {
|
|
width: Math.floor(root.width / 98) * 98
|
|
height: parent.height
|
|
anchors.centerIn: parent
|
|
ScrollBar.vertical: ScrollBar {}
|
|
model: ListModel {
|
|
id: packages
|
|
}
|
|
|
|
delegate: ColumnLayout {
|
|
Text { text: Backend.translate(name) }
|
|
GridLayout {
|
|
columns: root.width / 98
|
|
Repeater {
|
|
model: JSON.parse(Backend.callLuaFunction("GetCards", [name]))
|
|
CardItem {
|
|
autoBack: false
|
|
Component.onCompleted: {
|
|
let data = JSON.parse(Backend.callLuaFunction("GetCardData", [modelData]));
|
|
setData(data);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
Button {
|
|
text: Backend.translate("Quit")
|
|
anchors.right: parent.right
|
|
onClicked: {
|
|
mainStack.pop();
|
|
}
|
|
}
|
|
|
|
function loadPackages() {
|
|
if (loaded) return;
|
|
let packs = JSON.parse(Backend.callLuaFunction("GetAllCardPack", []));
|
|
packs.forEach((name) => packages.append({ name: name }));
|
|
loaded = true;
|
|
}
|
|
}
|