/// <summary> /// Set the Scale /// </summary> /// <param name="state"></param> public override void SetState(Interactive.ButtonStateEnum state) { base.SetState(state); if (mScaleTheme != null) { if (ScaleTweener != null) { ScaleTweener.TargetValue = mScaleTheme.GetThemeValue(state); ScaleTweener.StartRunning(); } else { transform.localScale = mScaleTheme.GetThemeValue(state); } } }
/// <summary> /// Set the position /// </summary> /// <param name="state"></param> public override void SetState(Interactive.ButtonStateEnum state) { base.SetState(state); if (mPositionTheme != null) { if (MovePositionTweener != null) { MovePositionTweener.TargetValue = mPositionTheme.GetThemeValue(state); MovePositionTweener.StartRunning(); } else { transform.localPosition = mPositionTheme.GetThemeValue(state); } } }
/// <summary> /// Set colors, position and label text /// </summary> /// <param name="state"></param> public override void SetState(Interactive.ButtonStateEnum state) { base.SetState(state); if (mText != null) { if (mColorTheme != null) { mText.color = mColorTheme.GetThemeValue(state); } if (ButtonLabels != null && this.name == "LabelDictation") { if (InteractiveHost.IsSelected) { if (ButtonLabels.Selected != "") { mText.text = ButtonLabels.Selected; } else { mText.text = ButtonLabels.Default; } } else { mText.text = ButtonLabels.Default; } } } if (mPositionTheme != null) { if (MovePosition != null) { MovePosition.TargetValue = mPositionTheme.GetThemeValue(state); MovePosition.StartRunning(); } else { transform.localPosition = mPositionTheme.GetThemeValue(state); } } }
/// <summary> /// set states or start animaitons /// </summary> /// <param name="state"></param> public override void SetState(Interactive.ButtonStateEnum state) { base.SetState(state); if (mColorTheme != null) { if (ColorBlender != null) { ColorBlender.StartTransition(mColorTheme.GetThemeValue(state)); } else if (mMaterial != null) { mMaterial.color = mColorTheme.GetThemeValue(state); } } if (mPositionTheme != null) { if (MovePosition != null) { MovePosition.TargetValue = mPositionTheme.GetThemeValue(state); MovePosition.StartRunning(); } else { transform.localPosition = mPositionTheme.GetThemeValue(state); } } if (mScaleTheme != null) { if (ScaleSize != null) { ScaleSize.TargetValue = mScaleTheme.GetThemeValue(state); ScaleSize.StartRunning(); } else { transform.localScale = mScaleTheme.GetThemeValue(state); } } }