protected void openSubWindow(System.Windows.Controls.Grid grid) { ribbon.IsEnabled = false; GameGrid.IsEnabled = false; ArchiveGrid.IsEnabled = false; FadeEffect fade = new FadeInEffect(timing); fade.Start(grid); }
public TitleScene() { _acceptTouch = false; _timer = 0.0f; Touch.GetData(0).Clear(); InitializeWidget(); TouchToStartText.Font = FontManager.Instance.Get("Bariol", 25); FadeInEffect effect = new FadeInEffect(TitleImage, 300, new FadeInEffectInterpolator() ); effect.EffectStopped += (sender, e) => { _acceptTouch = true; }; effect.Start(); }
private void playButtonClick(object sender, TouchEventArgs e) { State status = player.Status; if (status != State.Play) { FadeInEffect fadeInEffect = new FadeInEffect(busyDialog, 500, FadeInEffectInterpolator.Linear); //fadeInEffect.Start(); busyDialog.Show(fadeInEffect); this.Button_Resume.Visible = true; this.Button_Play.Visible = false; player.Play(this.UriText.Text); } }
public SplashScene() { InitializeWidget(); _timer = -100.0f; // SplashText.Font = FontManager.Instance.Get( "Bariol", 18 ); FadeInEffect fadeInEffect = new FadeInEffect( ImageBox_1, 300, new FadeInEffectInterpolator() ); fadeOutEffect = new FadeOutEffect( ImageBox_1, 300, new FadeOutEffectInterpolator() ); fadeInEffect.EffectStopped += (sender, e) => { _timer = 1.0f; }; fadeOutEffect.EffectStopped += (sender, e) => { fadeOutEffect = null; this.RootWidget.Dispose(); UISystem.SetScene( new TitleScene() ); }; fadeInEffect.Start(); }
public LoadingScene(int pLevelNumber, bool pTimed=false) { _angle = 0.0f; _timer = 0.0f; _levelNumber = pLevelNumber; _timed = pTimed; InitializeWidget(); Label_1.Font = FontManager.Instance.Get("Bariol", 25, "Bold"); // BusyIndicator_1.Visible = false; ImageBox_1.Visible = false; ImageBox_1.PivotType = PivotType.MiddleCenter; fadeInEffect = new FadeInEffect( ImageBox_1, 500.0f, new FadeInEffectInterpolator() ); // fadeInEffect.EffectStopped += HandleFadeInEffectEffectStopped; fadeInEffect.Start(); }
private void setInterfaceEnabledness(bool status) { BlurEffect blur; disabled = !status; CancelButton.IsEnabled = !status; ribbon.IsEnabled = status; GameGrid.IsEnabled = status; ArchiveGrid.IsEnabled = status; System.Windows.Visibility a; FadeEffect fade; if (status) { // this is when enabled fade = new FadeOutEffect(timing); a = System.Windows.Visibility.Collapsed; // b = System.Windows.Visibility.Visible; blur = null; } else { fade = new FadeInEffect(timing); // this is when disabled a = System.Windows.Visibility.Visible; // b = System.Windows.Visibility.Collapsed; blur = new BlurEffect(); blur.Radius = 10; } fade.Start(DisablerGrid); notifier.Animated = !status; notifier.MenuEnabled = status; //progress.Effect = blur; //ribbon.Effect = blur; //subGrid.Effect = blur; CancelButton.Visibility = a; // DisablerGrid.Visibility = a; }
public void OpenDialog() { FadeInEffect fadeInEffect = new FadeInEffect(this, 500, FadeInEffectInterpolator.Linear); //fadeInEffect.Start(); this.Show(fadeInEffect); }
private void OnEnable() { text = (FadeInEffect)target; }
private void OnGUI() { EditorGUI.BeginChangeCheck(); EditorGUILayout.Space(); /* * * ALL IMAGE RELATED STUFF HANDLED BELOW THE CUT * The user will simply choose the shader of their choice, drop it into the object field and use the button to assign the shader. * Using toggles to choose between different shaders proved to not be a useful way to assign shaders to game objects. * Scripts to handle the shader animation during game mode... leave the user to add the script component themselves? * Or add toggles to have the user choose the proper script? * */ EditorGUILayout.LabelField("Image effects", EditorStyles.boldLabel); EditorGUILayout.HelpBox("To apply shader effects to your image or game object, please put it in the appropriate field below. Then select a shader material and put it in the appropriate field below. Pre-made shaders will also come with a script. Imported or custom shaders will not have scripts applied since there aren't any pre-made scripts available.", MessageType.Info); EditorGUILayout.Space(); img = (Image)EditorGUILayout.ObjectField("Image content", img, typeof(Image), true); media = (GameObject)EditorGUILayout.ObjectField("Media content", media, typeof(GameObject), true); mat = (Material)EditorGUILayout.ObjectField("Material", mat, typeof(Material), true); EditorGUILayout.Space(); if (GUILayout.Button("Apply shader")) { /* * * This section handles shaders for image objects * */ if (img) { img.material = mat; GameObject go = img.gameObject; if (mat.name == "bubble") { if (go.GetComponent <bubbleScript>() == null) { go.AddComponent <bubbleScript>(); } } else if (mat.name == "checkerboard") { if (go.GetComponent <checkerboardScript>() == null) { go.AddComponent <checkerboardScript>(); } } else if (mat.name == "corrode") { if (go.GetComponent <corrodeScript>() == null) { go.AddComponent <corrodeScript>(); } } else if (mat.name == "dissolve1") { if (go.GetComponent <dissolve1Script>() == null) { go.AddComponent <dissolve1Script>(); } } else if (mat.name == "Dissolve2") { if (go.GetComponent <dissolve2Script>() == null) { go.AddComponent <dissolve2Script>(); } } else if (mat.name == "frost") { if (go.GetComponent <frostScript>() == null) { go.AddComponent <frostScript>(); } } else if (mat.name == "lines") { if (go.GetComponent <linesScript>() == null) { go.AddComponent <linesScript>(); } } else { return; } EditorUtility.SetDirty(img); } /* * * This section handles shaders for other applicable gameobjects * */ if (media) { Renderer rend = media.GetComponent <Renderer>(); rend.material = mat; if (mat.name == "bubble") { if (media.GetComponent <bubbleScript>() == null) { media.AddComponent <bubbleScript>(); } } else if (mat.name == "checkerboard") { if (media.GetComponent <checkerboardScript>() == null) { media.AddComponent <checkerboardScript>(); } } else if (mat.name == "corrode") { if (media.GetComponent <corrodeScript>() == null) { media.AddComponent <corrodeScript>(); } } else if (mat.name == "dissolve1") { if (media.GetComponent <dissolve1Script>() == null) { media.AddComponent <dissolve1Script>(); } } else if (mat.name == "Dissolve2") { if (media.GetComponent <dissolve2Script>() == null) { media.AddComponent <dissolve2Script>(); } } else if (mat.name == "frost") { if (media.GetComponent <frostScript>() == null) { media.AddComponent <frostScript>(); } } else if (mat.name == "lines") { if (media.GetComponent <linesScript>() == null) { media.AddComponent <linesScript>(); } } else { return; } EditorUtility.SetDirty(media); } } /* * * TEXT IMAGE RELATED STUFF HANDLED BELOW THE CUT * The user will simply use toggles to assign scripts to their text UI. * Toggles will be added to the window as additional effects are produced. * */ EditorGUILayout.Space(); EditorGUILayout.Space(); EditorGUILayout.Space(); EditorGUILayout.Space(); EditorGUILayout.LabelField("Text UI", EditorStyles.boldLabel); EditorGUILayout.HelpBox("This section handles applying visual effects to text objects. Drop the text object that you'd like to apply a visual effect to below. To apply effects, use the toggles.", MessageType.Info); EditorGUILayout.Space(); text = (GameObject)EditorGUILayout.ObjectField("Text", text, typeof(GameObject), true); EditorGUILayout.Space(); EditorGUILayout.LabelField("Text effects", EditorStyles.boldLabel); /////////////////////////// TYPEWRITER FX //////////////////////////// applyTypewriter = EditorGUILayout.ToggleLeft("Apply typewriter", applyTypewriter); if (text) { if (applyTypewriter == true) { try { if (text.GetComponent <TypewriterEffect>() == null) { text.AddComponent <TypewriterEffect>(); EditorUtility.SetDirty(text); } } catch (UnassignedReferenceException e) { } } if (applyTypewriter == false) { try { TypewriterEffect removing = text.GetComponent <TypewriterEffect>(); DestroyImmediate(removing); EditorUtility.SetDirty(text); } catch (UnassignedReferenceException e) { } } } /////////////////////////// FADE-IN FX //////////////////////////// applyFadein = EditorGUILayout.ToggleLeft("Apply fade-in", applyFadein); if (text) { if (applyFadein == true) { if (text.GetComponent <FadeInEffect>() == null) { text.AddComponent <FadeInEffect>(); EditorUtility.SetDirty(text); } } if (applyFadein == false) { try { FadeInEffect removing = text.GetComponent <FadeInEffect>(); DestroyImmediate(removing); EditorUtility.SetDirty(text); } catch (UnassignedReferenceException e) { } } } /////////////////////////// FADE-OUT FX //////////////////////////// applyFadeout = EditorGUILayout.ToggleLeft("Apply fade-out", applyFadeout); if (text) { if (applyFadeout == true) { if (text.GetComponent <FadeOutEffect>() == null) { text.AddComponent <FadeOutEffect>(); EditorUtility.SetDirty(text); } } if (applyFadeout == false) { try { FadeOutEffect removing = text.GetComponent <FadeOutEffect>(); DestroyImmediate(removing); EditorUtility.SetDirty(text); } catch (UnassignedReferenceException e) { } } } }