Class Popup.FadeBehavior

java.lang.Object
net.dermetfan.gdx.scenes.scene2d.ui.Popup.Behavior.Adapter
net.dermetfan.gdx.scenes.scene2d.ui.Popup.FadeBehavior
All Implemented Interfaces:
Popup.Behavior
Enclosing class:
Popup<T extends com.badlogic.gdx.scenes.scene2d.Actor>

public static class Popup.FadeBehavior extends Popup.Behavior.Adapter
fades in/out in show(Event, Popup)/hide(Event, Popup) using AlphaActions
  • Constructor Details

    • FadeBehavior

      public FadeBehavior()
      creates a FadeBehavior with the default values
    • FadeBehavior

      public FadeBehavior(float fadeDuration)
      Parameters:
      fadeDuration - the fadeInDuration and #fadeOutDuration
    • FadeBehavior

      public FadeBehavior(com.badlogic.gdx.math.Interpolation fadeInterpolation)
      Parameters:
      fadeInterpolation - the
    • FadeBehavior

      public FadeBehavior(float fadeDuration, com.badlogic.gdx.math.Interpolation fadeInterpolation)
      Parameters:
      fadeDuration - the fadeInDuration and fadeOutDuration
      fadeInterpolation - the fadeInInterpolation and fadeOutInterpolation
    • FadeBehavior

      public FadeBehavior(float fadeInDuration, float fadeOutDuration)
      Parameters:
      fadeInDuration - the fadeInDuration
      fadeOutDuration - the fadeOutDuration
    • FadeBehavior

      public FadeBehavior(com.badlogic.gdx.math.Interpolation fadeInInterpolation, com.badlogic.gdx.math.Interpolation fadeOutInterpolation)
      Parameters:
      fadeInInterpolation - the fadeInInterpolation
      fadeOutInterpolation - the fadeOutInterpolation
    • FadeBehavior

      public FadeBehavior(float fadeInDuration, float fadeOutDuration, com.badlogic.gdx.math.Interpolation fadeInInterpolation, com.badlogic.gdx.math.Interpolation fadeOutInterpolation)
      Parameters:
      fadeInDuration - the fadeInDuration
      fadeOutDuration - the fadeOutDuration
      fadeInInterpolation - the fadeInInterpolation
      fadeOutInterpolation - the fadeOutInterpolation
  • Method Details

    • show

      public boolean show(com.badlogic.gdx.scenes.scene2d.Event event, Popup popup)
      Specified by:
      show in interface Popup.Behavior
      Overrides:
      show in class Popup.Behavior.Adapter
      Parameters:
      event - the Event to handle
      popup - the Popup this Behavior is attached to
      Returns:
      true
    • hide

      public boolean hide(com.badlogic.gdx.scenes.scene2d.Event event, Popup popup)
      Specified by:
      hide in interface Popup.Behavior
      Overrides:
      hide in class Popup.Behavior.Adapter
      Parameters:
      event - the Event to handle
      popup - the Popup this Behavior is attached to
      Returns:
      false
    • getFadeInDuration

      public float getFadeInDuration()
      Returns:
      the fadeInDuration
    • setFadeInDuration

      public void setFadeInDuration(float fadeInDuration)
      Parameters:
      fadeInDuration - the fadeInDuration to set
    • getFadeOutDuration

      public float getFadeOutDuration()
      Returns:
      the fadeOutDuration
    • setFadeOutDuration

      public void setFadeOutDuration(float fadeOutDuration)
      Parameters:
      fadeOutDuration - the fadeOutDuration to set
    • getFadeInInterpolation

      public com.badlogic.gdx.math.Interpolation getFadeInInterpolation()
      Returns:
      the fadeInDuration
    • setFadeInInterpolation

      public void setFadeInInterpolation(com.badlogic.gdx.math.Interpolation fadeInInterpolation)
      Parameters:
      fadeInInterpolation - the fadeInInterpolation to set
    • getFadeOutInterpolation

      public com.badlogic.gdx.math.Interpolation getFadeOutInterpolation()
      Returns:
      the fadeOutInterpolation
    • setFadeOutInterpolation

      public void setFadeOutInterpolation(com.badlogic.gdx.math.Interpolation fadeOutInterpolation)
      Parameters:
      fadeOutInterpolation - the fadeOutInterpolation to set