mirror of
https://github.com/wassname/phaser.git
synced 2026-07-19 11:26:26 +08:00
Added in a Group.sort demo, also updated the documentation and build files.
This commit is contained in:
+27
-3
@@ -242,6 +242,10 @@
|
||||
<a href="Phaser.Pointer.html">Pointer</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.Polygon.html">Polygon</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.QuadTree.html">QuadTree</a>
|
||||
</li>
|
||||
@@ -548,6 +552,13 @@ Phaser.Button = function (game, x, y, key, callback, callbackContext, overFrame,
|
||||
*/
|
||||
this.freezeFrames = false;
|
||||
|
||||
/**
|
||||
* When the Button is clicked you can optionally force the state to "out".
|
||||
* @property {boolean} forceOut
|
||||
* @default
|
||||
*/
|
||||
this.forceOut = true;
|
||||
|
||||
this.setFrames(overFrame, outFrame, downFrame);
|
||||
|
||||
if (callback !== null)
|
||||
@@ -632,7 +643,7 @@ Phaser.Button.prototype.setFrames = function (overFrame, outFrame, downFrame) {
|
||||
{
|
||||
this._onDownFrameName = downFrame;
|
||||
|
||||
if (this.input.pointerOver())
|
||||
if (this.input.pointerDown())
|
||||
{
|
||||
this.frameName = downFrame;
|
||||
}
|
||||
@@ -641,7 +652,7 @@ Phaser.Button.prototype.setFrames = function (overFrame, outFrame, downFrame) {
|
||||
{
|
||||
this._onDownFrameID = downFrame;
|
||||
|
||||
if (this.input.pointerOver())
|
||||
if (this.input.pointerDown())
|
||||
{
|
||||
this.frame = downFrame;
|
||||
}
|
||||
@@ -892,10 +903,23 @@ Phaser.Button.prototype.onInputUpHandler = function (pointer) {
|
||||
this.onUpSound.play(this.onUpSoundMarker);
|
||||
}
|
||||
|
||||
if (this.forceOut && this.freezeFrames == false)
|
||||
{
|
||||
if (this._onOutFrameName != null)
|
||||
{
|
||||
this.frameName = this._onOutFrameName;
|
||||
}
|
||||
else if (this._onOutFrameID != null)
|
||||
{
|
||||
this.frame = this._onOutFrameID;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.onInputUp)
|
||||
{
|
||||
this.onInputUp.dispatch(this, pointer);
|
||||
}
|
||||
|
||||
};
|
||||
</pre>
|
||||
</article>
|
||||
@@ -918,7 +942,7 @@ Phaser.Button.prototype.onInputUpHandler = function (pointer) {
|
||||
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
|
||||
on Fri Nov 01 2013 18:16:08 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
on Thu Nov 07 2013 06:07:33 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user