uPlugins 0.1

Here some plugins of my favorite javascript framework.

  • Your feedbacks are welcome !
  • Enjoy it !


Details

Author
Jose Quintana
Current version
0.1
GitHub
joseluisq/mootools.plugins
Downloads
2556
Category
Interface
Tags
Report
GitHub Issues

Releases


How to use

This an example as usage uTetris game plugin:

    var tetris = new uTetris($('container'), $('preview'),{
        keypress: true
    });

    var play = $("play"), 
    score = $("score"), 
    level = $("level"), 
    lines = $("lines");

    tetris.addEvents({
        "start": function(e){
            setInfo(e);
            setPause();
        },
        "lines": setInfo,
        "fixed": setInfo,
        "pause": setPause,
        "gameover": function(){
            play.set("html", "Play");
        }
    });

    function setLabel(str) {
        play.set("html", str);
    }

    function setInfo(obj) {
        level.set("html", "Level: " + obj.level || 0);
        score.set("html", "Score: " + obj.score || 0);
        lines.set("html", "Lines: " + obj.lines || 0);
    }

    function setPause(pause) {
        setLabel(pause ? "Resume" : "Pause");
    }

    play.addEvent("click",function() {
        if (this.isStop()) {
            this.restart();
        } else {
            this.pause();
        }
    }.bind(tetris));

Plugins List

  • uTetris 1.0 Custom version of Tetris game
  • uSize 1.0 Size handler for DOM elements
  • uSlideshow 1.0 Slideshow viewer
  • uRequest 1.0
    Works with ajax queries and serializes form fields
  • uValidator 1.0
    Simple validator to form fields
  • uMessagebox 1.0 Messagebox for user alert

Live Demos

  • Tetris game live demo here

Discuss

A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.

Found a bug in this plugin? Please report it this repository's Github Issues.

blog comments powered by Disqus