Class Screen

java.lang.Object
de.gurkenlabs.litiengine.gui.GuiComponent
de.gurkenlabs.litiengine.gui.screens.Screen
All Implemented Interfaces:
IRenderable, Tweenable, MouseListener, MouseMotionListener, MouseWheelListener, EventListener
Direct Known Subclasses:
GameScreen

public abstract class Screen extends GuiComponent
Screens are the containers that allow you to organize the visible contents of your game. They render the game's Environment and are considered the parent of all GUI components you want to display in a particular state of your game. The screen itself inherits from GuiComponent and thereby provides support to define an Appearance and listen to all kinds of Input events (e.g. onMouseMoved(…)). Everything that should be visible to the player needs to be rendered to the currently active screen.
  • Constructor Details

    • Screen

      protected Screen(String screenName)
  • Method Details

    • setX

      public void setX(double x)
      Overrides the setX method from GuiComponent to prevent changing the x-coordinate. This method does nothing because screens always start at the coordinates (0, 0).
      Overrides:
      setX in class GuiComponent
      Parameters:
      x - The new x-coordinate, which will be ignored.
    • setY

      public void setY(double y)
      Overrides the setY method from GuiComponent to prevent changing the y-coordinate. This method does nothing because screens always start at the coordinates (0, 0).
      Overrides:
      setY in class GuiComponent
      Parameters:
      y - The new y-coordinate, which will be ignored.