mirror of
https://github.com/Doodle3D/doodle3d-client.git
synced 2024-11-22 09:17:56 +01:00
Fixed Buttons
This commit is contained in:
parent
6d71db1e84
commit
0b33b87009
@ -11,14 +11,14 @@
|
|||||||
Button.prototype = new jQuery();
|
Button.prototype = new jQuery();
|
||||||
function Button() {
|
function Button() {
|
||||||
|
|
||||||
this.enabled;
|
this.enabled = true;
|
||||||
|
|
||||||
var _clickEnabled = true;
|
var _clickEnabled = true;
|
||||||
var _downTimerFPS = 20;
|
var _downTimerFPS = 20;
|
||||||
var _timer;
|
var _timer;
|
||||||
var _x,_y;
|
var _x,_y;
|
||||||
var _isDown = false;
|
var _isDown = false;
|
||||||
|
var _firstEnable = true;
|
||||||
var _self = this;
|
var _self = this;
|
||||||
|
|
||||||
// call jQuery constuctor
|
// call jQuery constuctor
|
||||||
@ -34,9 +34,10 @@ function Button() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.enable = function() {
|
this.enable = function() {
|
||||||
if(_self.enabled === true) { return; }
|
if(!_firstEnable && _self.enabled === true) { return; }
|
||||||
_self.removeClass("disabled");
|
_self.removeClass("disabled");
|
||||||
_self.enabled = true;
|
_self.enabled = true;
|
||||||
|
_firstEnable = false;
|
||||||
};
|
};
|
||||||
this.disable = function() {
|
this.disable = function() {
|
||||||
if(_self.enabled === false) { return; }
|
if(_self.enabled === false) { return; }
|
||||||
|
Loading…
Reference in New Issue
Block a user