Package com.csse3200.game.ui
Class HoverEffectHelper
java.lang.Object
com.csse3200.game.ui.HoverEffectHelper
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidapplyFadeIn(com.badlogic.gdx.scenes.scene2d.ui.TextButton button, float delay, float duration) Apply a fade-in effect (useful for delayed reveal).static voidapplyHoverEffects(List<com.badlogic.gdx.scenes.scene2d.ui.TextButton> menuButtons) Adds hover enlarge/shrink behaviour to a group of buttons.static voidapplyHoverInterruptiblePulse(com.badlogic.gdx.scenes.scene2d.ui.TextButton button, float scaleAmount, float duration) static voidapplyIdlePulse(com.badlogic.gdx.scenes.scene2d.ui.TextButton button, com.badlogic.gdx.graphics.Color c1, com.badlogic.gdx.graphics.Color c2, float duration) Apply an idle pulsing color effect (good for death screen buttons).static voidapplyJitter(com.badlogic.gdx.scenes.scene2d.ui.TextButton button, float amount, float speed) Apply a jitter/shake effect (adds unease).static voidapplySlinkyEffect(List<com.badlogic.gdx.scenes.scene2d.ui.TextButton> buttons, float scaleUp, float duration, float delayBetween) Apply a slinky wave effect across multiple buttons.static voidapplySubtlePulse(com.badlogic.gdx.scenes.scene2d.ui.TextButton button, float scaleAmount, float duration) Apply a subtle pulsing scale effect (gentle grow/shrink loop).
-
Method Details
-
applyHoverEffects
public static void applyHoverEffects(List<com.badlogic.gdx.scenes.scene2d.ui.TextButton> menuButtons) Adds hover enlarge/shrink behaviour to a group of buttons. -
applyIdlePulse
public static void applyIdlePulse(com.badlogic.gdx.scenes.scene2d.ui.TextButton button, com.badlogic.gdx.graphics.Color c1, com.badlogic.gdx.graphics.Color c2, float duration) Apply an idle pulsing color effect (good for death screen buttons). -
applyFadeIn
public static void applyFadeIn(com.badlogic.gdx.scenes.scene2d.ui.TextButton button, float delay, float duration) Apply a fade-in effect (useful for delayed reveal). -
applyJitter
public static void applyJitter(com.badlogic.gdx.scenes.scene2d.ui.TextButton button, float amount, float speed) Apply a jitter/shake effect (adds unease). -
applySubtlePulse
public static void applySubtlePulse(com.badlogic.gdx.scenes.scene2d.ui.TextButton button, float scaleAmount, float duration) Apply a subtle pulsing scale effect (gentle grow/shrink loop). -
applySlinkyEffect
public static void applySlinkyEffect(List<com.badlogic.gdx.scenes.scene2d.ui.TextButton> buttons, float scaleUp, float duration, float delayBetween) Apply a slinky wave effect across multiple buttons. Each button enlarges in sequence, then shrinks back as the next enlarges. -
applyHoverInterruptiblePulse
public static void applyHoverInterruptiblePulse(com.badlogic.gdx.scenes.scene2d.ui.TextButton button, float scaleAmount, float duration)
-