mirror of
https://github.com/Qsgs-Fans/FreeKill.git
synced 2024-11-16 03:32:34 +08:00
补完反选按钮(顺便性能up) (#390)
This commit is contained in:
parent
f0ffd68ff2
commit
0233746ead
|
@ -326,6 +326,7 @@ Item {
|
|||
|
||||
dashboard.disableAllCards();
|
||||
dashboard.disableSkills();
|
||||
dashboard.pending_skill = "";
|
||||
// dashboard.retractAllPiles();
|
||||
|
||||
for (let i = 0; i < photoModel.count; i++) {
|
||||
|
@ -451,11 +452,11 @@ Item {
|
|||
if (dashboard.handcardArea.length <= 15) {
|
||||
return false;
|
||||
}
|
||||
if (roomScene.state === "notactive"
|
||||
|| roomScene.state === "replying") {
|
||||
return false;
|
||||
const cards = dashboard.handcardArea.cards;
|
||||
for (const card in cards) {
|
||||
if (card.selectable) return true;
|
||||
}
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
onClicked: roomScene.startCheat("../RoomElement/ChooseHandcard");
|
||||
}
|
||||
|
@ -464,7 +465,10 @@ Item {
|
|||
text: luatr("Revert Selection")
|
||||
textFont.pixelSize: 28
|
||||
enabled: dashboard.pending_skill !== ""
|
||||
onClicked: dashboard.revertSelection();
|
||||
onClicked: //dashboard.revertSelection();
|
||||
{
|
||||
lcall("RevertSelection");
|
||||
}
|
||||
}
|
||||
// MetroButton {
|
||||
// text: luatr("Trust")
|
||||
|
|
|
@ -91,17 +91,6 @@ RowLayout {
|
|||
}
|
||||
}
|
||||
|
||||
function getSelectedCard() {
|
||||
if (pending_skill !== "") {
|
||||
return JSON.stringify({
|
||||
skill: pending_skill,
|
||||
subcards: pendings
|
||||
});
|
||||
} else {
|
||||
return selected_card;
|
||||
}
|
||||
}
|
||||
|
||||
function deactivateSkillButton() {
|
||||
for (let i = 0; i < skillButtons.count; i++) {
|
||||
let item = skillButtons.itemAt(i);
|
||||
|
@ -209,6 +198,8 @@ RowLayout {
|
|||
break;
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
pending_skill = lcall("GetPendingSkill");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user