Class WinScreen

All Implemented Interfaces:
ContainerEventHandler, GuiEventListener, Renderable, TabOrderedElement

public class WinScreen extends Screen
  • Field Details

    • VIGNETTE_LOCATION

      private static final Identifier VIGNETTE_LOCATION
    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • SECTION_HEADING

      private static final Component SECTION_HEADING
    • NAME_PREFIX

      private static final String NAME_PREFIX
      See Also:
    • OBFUSCATE_TOKEN

      private static final String OBFUSCATE_TOKEN
    • SPEEDUP_FACTOR

      private static final float SPEEDUP_FACTOR
      See Also:
    • SPEEDUP_FACTOR_FAST

      private static final float SPEEDUP_FACTOR_FAST
      See Also:
    • END_POEM_LOCATION

      private static final Identifier END_POEM_LOCATION
    • CREDITS_LOCATION

      private static final Identifier CREDITS_LOCATION
    • POSTCREDITS_LOCATION

      private static final Identifier POSTCREDITS_LOCATION
    • poem

      private final boolean poem
    • onFinished

      private final Runnable onFinished
    • scroll

      private float scroll
    • lines

      private List<FormattedCharSequence> lines
    • narratorComponents

      private List<Component> narratorComponents
    • centeredLines

      private it.unimi.dsi.fastutil.ints.IntSet centeredLines
    • totalScrollLength

      private int totalScrollLength
    • speedupActive

      private boolean speedupActive
    • speedupModifiers

      private final it.unimi.dsi.fastutil.ints.IntSet speedupModifiers
    • scrollSpeed

      private float scrollSpeed
    • unmodifiedScrollSpeed

      private final float unmodifiedScrollSpeed
    • direction

      private int direction
    • logoRenderer

      private final LogoRenderer logoRenderer
  • Constructor Details

    • WinScreen

      public WinScreen(boolean poem, Runnable onFinished)
  • Method Details

    • calculateScrollSpeed

      private float calculateScrollSpeed()
    • tick

      public void tick()
      Overrides:
      tick in class Screen
    • keyPressed

      public boolean keyPressed(KeyEvent event)
      Specified by:
      keyPressed in interface ContainerEventHandler
      Specified by:
      keyPressed in interface GuiEventListener
      Overrides:
      keyPressed in class Screen
    • keyReleased

      public boolean keyReleased(KeyEvent event)
    • onClose

      public void onClose()
      Overrides:
      onClose in class Screen
    • respawn

      private void respawn()
    • init

      protected void init()
      Overrides:
      init in class Screen
    • getNarrationMessage

      public Component getNarrationMessage()
      Overrides:
      getNarrationMessage in class Screen
    • wrapCreditsIO

      private void wrapCreditsIO(Identifier file, WinScreen.CreditsReader creditsReader)
    • addPoemFile

      private void addPoemFile(Reader inputReader) throws IOException
      Throws:
      IOException
    • addCreditsFile

      private void addCreditsFile(Reader inputReader)
    • addEmptyLine

      private void addEmptyLine()
    • addPoemLines

      private void addPoemLines(String line)
    • addCreditsLine

      private void addCreditsLine(Component line, boolean centered, boolean narrated)
    • render

      public void render(GuiGraphics graphics, int mouseX, int mouseY, float a)
      Description copied from interface: Renderable
      Renders the graphical user interface (GUI) element.
      Specified by:
      render in interface Renderable
      Overrides:
      render in class Screen
      Parameters:
      graphics - the GuiGraphics object used for rendering.
      mouseX - the x-coordinate of the mouse cursor.
      mouseY - the y-coordinate of the mouse cursor.
      a - the partial tick time.
    • renderVignette

      private void renderVignette(GuiGraphics graphics)
    • renderBackground

      public void renderBackground(GuiGraphics graphics, int mouseX, int mouseY, float a)
      Overrides:
      renderBackground in class Screen
    • renderMenuBackground

      protected void renderMenuBackground(GuiGraphics graphics, int x, int y, int width, int height)
      Overrides:
      renderMenuBackground in class Screen
    • isPauseScreen

      public boolean isPauseScreen()
      Overrides:
      isPauseScreen in class Screen
    • isAllowedInPortal

      public boolean isAllowedInPortal()
      Overrides:
      isAllowedInPortal in class Screen
    • removed

      public void removed()
      Overrides:
      removed in class Screen
    • getBackgroundMusic

      public Music getBackgroundMusic()
      Overrides:
      getBackgroundMusic in class Screen