From e121233e9dbb1a21685b5389cccd1633580cc868 Mon Sep 17 00:00:00 2001 From: YoumuKon <38815081+YoumuKon@users.noreply.github.com> Date: Wed, 3 Jul 2024 09:57:06 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=82=E6=98=9F=E7=BE=8E=E5=8C=96=20(#361)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 拖拽卡牌悬停时可以显示金色包边 --- Fk/RoomElement/GuanxingBox.qml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Fk/RoomElement/GuanxingBox.qml b/Fk/RoomElement/GuanxingBox.qml index f3fb69a1..048a21b0 100644 --- a/Fk/RoomElement/GuanxingBox.qml +++ b/Fk/RoomElement/GuanxingBox.qml @@ -268,6 +268,10 @@ GraphicsBox { b++; pos = mapFromItem(pile, box.x, box.y); card.glow.visible = false; + if (movepos.length === 2 && result[j].length === areaCapacities[j] && movepos[0] === j && movepos[1] === b) { + card.glow.color = "gold"; + card.glow.visible = true; + } else card.glow.color = "#88FFFFFF"; card.origX = (movepos.length === 2 && movepos[0] === j && b > (movepos[1] - (is_exchange ? 0 : 1))) ? (pos.x + (b - 1) * spacing + 100) : (pos.x + b * spacing); card.origY = pos.y; card.opacity = 1; @@ -284,9 +288,9 @@ GraphicsBox { card.selectable = !org_cards[0].includes(dragging_card.cid) || i === org_cards[0].indexOf(dragging_card.cid); else { if (result[0].includes(dragging_card)) - card.selectable = result[0].length < areaCapacities[0] || !org_cards[0].includes(card.cid) || card.cid === org_cards[0][result[0].indexOf(dragging_card)] + card.selectable = result[0].length < areaCapacities[0] || !org_cards[0].includes(card.cid) || card.cid === org_cards[0][result[0].indexOf(dragging_card)]; else - card.selectable = org_cards[0].includes(dragging_card.cid) || card.cid === org_cards[0][result[0].indexOf(dragging_card)] + card.selectable = org_cards[0].includes(dragging_card.cid) || card.cid === org_cards[0][result[0].indexOf(dragging_card)]; } } card.draggable = (dragging_card === "") && (free_arrange || j > 0 || card.selectable);