Well, you could do something where you create another sprite to replace the mouse, and if the mouse sprite is coliding with the card sprite, do a specific action.
I think the code would be something like this:
#include "DarkGDK.h"
void DarkGDK() {
dbSyncOn();
dbSyncRate(60);
// Create the mouse
dbCreateAnimatedSprite(1, "mouse.png", 1, 1, 1);
dbHideMouse();
// Create the card
dbCreaiteAnimatedSprite(2, "card.png", 1, 1, 2);
while (LoopGDK()) {
dbCLS();
// Have the mouse sprite follow the mouse
dbSprite(1, dbMouseX(), dbMouseY());
// Display the card.
dbSprite(2, 50, 50);
// Check for mouse click, and the mouse being over the card.
if (dbSpriteHit(1, 2) && dbMouseClick()) {
// Here, were just hiding the card as an example.
dbHideSprite(2);
// Just for verification that the collision and click worked.
dbText(0, 0, "Card Hidden!");
}
dbSync();
}
return 0;
}
If you don't like to use your own sprite for a mouse, could could create a pixel using dbDot() to follow the mouse, yet have it's opacity set to 0, and use that as the collision checker. Not sure exactly how to do that though.
http://www.darkgdk.us/ <- New community for DarkGDK coming soon!