Exemplo n.º 1
0
 @Override
 public void setAlpha(float a) {
   super._alpha = a;
   super._color.a = a;
   for (String name : this._buttonElement.keys()) {
     LNNode node = this._buttonElement.get(name);
     node.setAlpha(a);
   }
 }
Exemplo n.º 2
0
 @Override
 public void processTouchDragged() {
   super.processTouchDragged();
   for (String key : this._buttonElement.keys()) {
     LNNode node = this._buttonElement.get(key);
     node.stopAllAction();
     if (this._touchBeganAction.containsKey(key)) {
       node.runAction(this._touchBeganAction.get(key));
     }
   }
   isDraging = true;
 }
Exemplo n.º 3
0
 @Override
 public void update(float dt) {
   super.update(dt);
   if (isDraging && !SysTouch.isDrag()) {
     for (String key : this._buttonElement.keys()) {
       LNNode node = this._buttonElement.get(key);
       node.stopAllAction();
       if (this._touchMoveOutAction.containsKey(key)) {
         node.runAction(this._touchMoveOutAction.get(key));
       }
     }
     isDraging = false;
   }
 }
Exemplo n.º 4
0
 @Override
 public void processTouchPressed() {
   if (!isPressed) {
     super.processTouchPressed();
     for (String str : this._buttonElement.keys()) {
       LNNode node = this._buttonElement.get(str);
       node.stopAllAction();
       if (this._touchBeganAction.containsKey(str)) {
         node.runAction(this._touchBeganAction.get(str));
       }
     }
     isPressed = true;
   }
 }
Exemplo n.º 5
0
 @Override
 public void processTouchReleased() {
   if (isPressed) {
     super.processTouchReleased();
     float num = 0f;
     for (String str : this._buttonElement.keys()) {
       LNNode node = this._buttonElement.get(str);
       node.stopAllAction();
       if (this._touchClickedAction.containsKey(str)) {
         num = MathUtils.max(num, this._touchClickedAction.get(str).getDuration());
         node.runAction(this._touchClickedAction.get(str));
       }
     }
     if (ActionCallBack != null) {
       if (num > 0f) {
         super.runAction(
             LNSequence.Action(LNDelay.Action(num), LNCallFunc.Action(ActionCallBack)));
       } else {
         super.runAction(LNCallFunc.Action(ActionCallBack));
       }
     }
     isPressed = false;
   }
 }
Exemplo n.º 6
0
 private void init() {
   this._touchID = -1;
   this._enabled = true;
   this._bold = 0f;
   super.setNodeSize(0, 0);
 }
Exemplo n.º 7
0
 public void setTarget(LNNode node) {
   super._firstTick = true;
   super._isEnd = false;
   super._target = node;
   this._orgPos = node.getPosition();
 }