private void OnAction(UIRemodelShipSliderThumb.ActionType actionType, UIRemodelShipSliderThumb calledObject) { if (this.mUIRemodelShipSliderThumbAction != null) { this.mUIRemodelShipSliderThumbAction(actionType, calledObject); } }
private void ProcessSliderThumbAction(UIRemodelShipSliderThumb.ActionType actionType, UIRemodelShipSliderThumb calledObject) { if (!base.get_enabled()) { return; } if (actionType != UIRemodelShipSliderThumb.ActionType.Move) { if (actionType == UIRemodelShipSliderThumb.ActionType.FingerUp) { calledObject.get_transform().localPositionY((float)(-(float)this.mIndex * this.mCellHeight)); } } else { calledObject.get_transform().set_position(calledObject.mNextDragWorldPosition); if (0f < calledObject.get_transform().get_localPosition().y) { calledObject.get_transform().localPositionY(0f); } else if (calledObject.get_transform().get_localPosition().y < (float)(-(float)((this.mShipCount - 1) * this.mCellHeight))) { calledObject.get_transform().localPositionY((float)(-(float)((this.mShipCount - 1) * this.mCellHeight))); } this.OnUpdateIndex(this.ThumbLocalPositionToIndex(calledObject.get_transform().get_localPosition())); } }
private void ProcessSliderThumbAction(UIRemodelShipSliderThumb.ActionType actionType, UIRemodelShipSliderThumb calledObject) { if (!base.enabled) { return; } switch (actionType) { case UIRemodelShipSliderThumb.ActionType.Move: { calledObject.transform.position = calledObject.mNextDragWorldPosition; Vector3 localPosition = calledObject.transform.localPosition; if (0f < localPosition.y) { calledObject.transform.localPositionY(0f); } else { Vector3 localPosition2 = calledObject.transform.localPosition; if (localPosition2.y < (float)(-((mShipCount - 1) * mCellHeight))) { calledObject.transform.localPositionY(-((mShipCount - 1) * mCellHeight)); } } OnUpdateIndex(ThumbLocalPositionToIndex(calledObject.transform.localPosition)); break; } case UIRemodelShipSliderThumb.ActionType.FingerUp: calledObject.transform.localPositionY(-mIndex * mCellHeight); break; } }