Class Screen
java.lang.Object
de.gurkenlabs.litiengine.gui.GuiComponent
de.gurkenlabs.litiengine.gui.screens.Screen
- All Implemented Interfaces:
IRenderable
,Tweenable
,java.awt.event.MouseListener
,java.awt.event.MouseMotionListener
,java.awt.event.MouseWheelListener
,java.util.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.Field Summary
Constructor Summary
Constructors Modifier Constructor Description protected
Screen(java.lang.String screenName)
Method Summary
Methods inherited from class de.gurkenlabs.litiengine.gui.GuiComponent
drawTextShadow, getAppearance, getAppearanceDisabled, getAppearanceHovered, getBoundingBox, getClickConsumer, getComponentId, getComponents, getCurrentAppearance, getFont, getHeight, getHoverConsumer, getHoverSound, getLocation, getMouseDraggedConsumer, getMouseEnterConsumer, getMouseLeaveConsumer, getMouseMovedConsumer, getMousePressedConsumer, getMouseReleasedConsumer, getMouseWheelConsumer, getName, getShape, getTag, getText, getTextAlign, getTextAngle, getTextShadowColor, getTextShadowStroke, getTextToRender, getTextValign, getTextX, getTextY, getTweenValues, getWidth, getX, getY, hasAutomaticLineBreaks, hasTextAntialiasing, initializeComponents, isEnabled, isForwardMouseEvents, isHovered, isPressed, isSelected, isSuspended, isVisible, mouseClicked, mouseDragged, mouseEntered, mouseEventShouldBeForwarded, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, onClicked, onHovered, onMouseDragged, onMouseEnter, onMouseLeave, onMouseMoved, onMousePressed, onMouseReleased, onMouseWheelScrolled, onTextChanged, prepare, render, setAutomaticLineBreaks, setDimension, setEnabled, setFont, setFontSize, setForwardMouseEvents, setHeight, setHovered, setHoverSound, setLocation, setLocation, setName, setSelected, setTag, setText, setTextAlign, setTextAngle, setTextAntialiasing, setTextShadow, setTextShadowColor, setTextShadowStroke, setTextValign, setTextX, setTextY, setTweenValues, setVisible, setWidth, suspend, toggleSelection, toggleSuspension
Constructor Details
Screen
protected Screen(java.lang.String screenName)
Method Details
setX
public void setX(double x)Description copied from class:GuiComponent
Sets the GuiComponent's x coordinate.- Overrides:
setX
in classGuiComponent
- Parameters:
x
- the new x coordinate
setY
public void setY(double y)Description copied from class:GuiComponent
Sets the GuiComponent's y coordinate.- Overrides:
setY
in classGuiComponent
- Parameters:
y
- the new y coordinate