Class Letterbox

java.lang.Object
net.ixdarklord.coolcatcanvas.api.client.cutscene.Letterbox

public final class Letterbox extends Object
Letterbox bars on their own, without a cutscene: for a boss entrance, a scripted moment the player still controls, a photo mode. They slide in and out, sit under the HUD, and frame an aspect ratio: top and bottom on a screen taller than it, left and right on a wider one.
Letterbox.show(20);                 // cinema bars, in over a second
Letterbox.show(1.85F, 10);
Letterbox.hide(20);
A cutscene with a letterbox of its own draws its bars regardless of these.
  • Method Details

    • show

      public static void show(int ticks)
      Slides in bars framing the cinema ratio (Cutscene.CINEMATIC_ASPECT) over some ticks.
    • show

      public static void show(float aspect, int ticks)
      Slides in bars framing an aspect ratio.
      Parameters:
      aspect - width over height, above 0
      ticks - how long they take to arrive; 0 puts them there at once
    • hide

      public static void hide(int ticks)
      Slides the bars out over some ticks; 0 removes them at once.
    • isShown

      public static boolean isShown()
      Whether the bars are asked for; they may still be sliding in.