Class MilkIntro

java.lang.Object
wiiuu.ui.MilkIntro

public final class MilkIntro extends Object
A reusable chocolate-milk intro: a glass drops in, syrup pours in, a straw lands and the host application's title appears letter by letter. It fades out after 3.5 seconds. The host owns repaint scheduling, the underlying screen and any input that skips the intro.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final long
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    MilkIntro(MilkTheme look, String title, String tagline)
    Start an intro now, with the host application's title and tagline.
    MilkIntro(MilkTheme look, String title, String tagline, long start)
    Start at an explicit timestamp, for deterministic rendering or a host animation clock.
  • Method Summary

    Modifier and Type
    Method
    Description
    float
    cover(long now)
    How much of the intro covers the list (1, then fading to 0 at the end).
    boolean
    done(long now)
     
    void
    paint(Graphics2D graphics, int w, int h, long now)
    Paint without changing the caller's graphics state.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • MilkIntro

      public MilkIntro(MilkTheme look, String title, String tagline)
      Start an intro now, with the host application's title and tagline.
    • MilkIntro

      public MilkIntro(MilkTheme look, String title, String tagline, long start)
      Start at an explicit timestamp, for deterministic rendering or a host animation clock.
  • Method Details

    • done

      public boolean done(long now)
    • cover

      public float cover(long now)
      How much of the intro covers the list (1, then fading to 0 at the end).
    • paint

      public void paint(Graphics2D graphics, int w, int h, long now)
      Paint without changing the caller's graphics state. The host schedules repaints and skipping.