AvriCard : how to manage cards !
Par Quentin Ambard le samedi, septembre 12 2009, 17:51 - Classe Mootools - Lien permanent
AvriCard :
AvriCard is a little MooClass designed for Lord Of Castle New Frontier.
There is no many options, because it's for a very specific usage, but it's easy to add some features if you need it !
It's not based on Drag.moves class and droppables Element, because I dont like the fact you need to have the mouse over the element to start the event. If you have big cards it can be bad !
Download AvriCard ( AvriDeck + AvriCardSlot):
Exemple :
demo : (just drag the cards over the slots)
Syntax :
// The most easy way : //we first create a couple of deck var deck1 = new AvriDeck ($('deck1'),{top: 400, left: 100, zIndex: 9999}); var deck2 = new AvriDeck ($('deck2'),{top: 400, left: 300, zIndex: 9999}); var deck3 = new AvriDeck ($('deck3'),{top: 400, left: 500, zIndex: 9999}); //next we create the slots avriSlot = new AvriCardSlot([deck1, deck2, deck3], 'cardSlot', {container: 'divCarte', widthCard: 165, widthSlot: 240, heightSlot: 213, numSlot: 4, urlOverLight: './contourLumineux.png'});
Options :
AvriCardSlot
- container: '', // The id of your container (limit of the card's drag)!
- widthCard: 165, // int !
- widthSlot: 200, // int (can be > widthCard, if there is a free espace between 2 slot):
- heightSlot: 300, // int
- numSlot: 20, // int
Methods :
none
ChangeLog :
v 0.1 - 12 September, 2009
- first release
v 0.1.1 - 14 September, 2009
- Tips bug fixed