void OnPress(bool isPressed) { if (isPressed) { _buttonLabel.color = ColorManagementSystemController.GetCurrentTextColor(); } else { _buttonLabel.color = Color.white; } }
private void Init() { if (null == _uiWidgets) { throw new NullReferenceException("Used component without initializing"); } foreach (UIWidget uiWidget in _uiWidgets) { uiWidget.color = ColorManagementSystemController.GetCurrentTextColor(); } }
public IEnumerator PlayVideo() { ITTGoogleAnalytics.Instance.googleAnalytics.LogEvent(new EventHitBuilder() .SetEventCategory("FTUE - Launch Video") .SetEventAction("Play") .SetEventLabel("First time launch intro video played")); Color clearColor = ColorManagementSystemController.GetCurrentTextColor(); Handheld.PlayFullScreenMovie("ActiveLife_Anim_v3_b.mp4", clearColor, FullScreenMovieControlMode.Hidden, FullScreenMovieScalingMode.Fill); currentState = ITTMainSceneManager.ITTStates.Tooltip; yield break; }
private IEnumerator AnimateFacebookShareConfirmation(string labelText) { // Update colors UILabel label = model.FacebookShareConfirmation.GetComponentInChildren <UILabel>(); if (null != label) { label.color = ColorManagementSystemController.GetCurrentTextColor(); label.text = labelText; } UISprite sprite = model.FacebookShareConfirmation.GetComponentInChildren <UISprite>(); if (null != sprite) { switch (labelText) { case "SUCCESS": sprite.spriteName = "Checkmark"; sprite.transform.localPosition = new Vector3(-90.0f, sprite.transform.position.y, sprite.transform.position.z); break; case "CANCELLED": sprite.spriteName = "ClearSearch"; sprite.transform.localPosition = new Vector3(-110.0f, sprite.transform.position.y, sprite.transform.position.z); break; case "FAILED": sprite.spriteName = "ClearSearch"; sprite.transform.localPosition = new Vector3(-80.0f, sprite.transform.position.y, sprite.transform.position.z); break; } sprite.color = ColorManagementSystemController.GetCurrentTextColor(); } Vector3 visiblePos = new Vector3(0f, -480f, 0f); Vector3 invisiblePos = new Vector3(0f, -600f, 0f); model.FacebookShareConfirmation.transform.localPosition = invisiblePos; TweenPosition.Begin(model.FacebookShareConfirmation, 0.25f, visiblePos); yield return(new WaitForSeconds(0.25f)); yield return(new WaitForSeconds(2.0f)); // hold for 2 seconds TweenPosition.Begin(model.FacebookShareConfirmation, 0.25f, invisiblePos); }