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