@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); } }
@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; }
@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; } }
@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; } }
@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; } }
private void init() { this._touchID = -1; this._enabled = true; this._bold = 0f; super.setNodeSize(0, 0); }
public void setTarget(LNNode node) { super._firstTick = true; super._isEnd = false; super._target = node; this._orgPos = node.getPosition(); }