From 5cddf5630ff0e408a84c19b7bb5ebc36871fa025 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Mon, 27 Jul 2009 15:22:45 +1000 Subject: Add a glowy effect like KSame to SameGame Just want this in the repo, samegame is about to be majorly revised. --- demos/declarative/samegame/content/BoomBlock.qml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/demos/declarative/samegame/content/BoomBlock.qml b/demos/declarative/samegame/content/BoomBlock.qml index 9637bd6..ec4430e 100644 --- a/demos/declarative/samegame/content/BoomBlock.qml +++ b/demos/declarative/samegame/content/BoomBlock.qml @@ -11,9 +11,17 @@ Item { id:block x: Follow { enabled: spawned; source: targetX; spring: 2; damping: 0.2 } y: Follow { source: targetY; spring: 2; damping: 0.2 } + //TODO: Replace with an image with a fuzzy effect like KSame + Rect { id: shine; radius:16; anchors.fill:parent; color: "yellow"; + opacity: 0 + opacity: SequentialAnimation{running: selected&&!dying; finishPlaying: true; repeat: true + NumberAnimation{ from: 0; to: 1; }NumberAnimation{ from:1; to:0; }} + } MouseRegion { id: gameMR; anchors.fill: parent onClicked: handleClick(Math.floor(parent.x/width), Math.floor(parent.y/height)); + onEntered: handleHover(Math.floor(parent.x/width), Math.floor(parent.y/height)); + onExited: handleHover(-1,-1); } Image { id: img -- cgit v0.12