Package de.gurkenlabs.litiengine.gui
Class Menu
java.lang.Object
de.gurkenlabs.litiengine.gui.GuiComponent
de.gurkenlabs.litiengine.gui.ImageComponentList
de.gurkenlabs.litiengine.gui.Menu
- All Implemented Interfaces:
IRenderable,Tweenable,MouseListener,MouseMotionListener,MouseWheelListener,EventListener
The Class Menu.
-
Field Summary
Fields inherited from class de.gurkenlabs.litiengine.gui.GuiComponent
ICON_FONT -
Constructor Summary
ConstructorsConstructorDescriptionMenu(double x, double y, double width, double height, Spritesheet background, String... items) -
Method Summary
Modifier and TypeMethodDescriptionintvoidonChange(IntConsumer cons) voidprepare()Prepare the GuiComponent and all its child Components (Makes the GuiComponent visible and adds mouse listeners.).voidsetCurrentSelection(int currentSelection) Methods inherited from class de.gurkenlabs.litiengine.gui.ImageComponentList
createNewEntry, getBackground, getCellComponents, getColumns, getColumnWidth, getImages, getRowHeight, getRows, setColumnWidth, setRowHeight, setXOffset, setYOffsetMethods inherited from class de.gurkenlabs.litiengine.gui.GuiComponent
addRenderedListener, addRenderListener, getAppearance, getAppearanceDisabled, getAppearanceHovered, getBoundingBox, getCenterX, getCenterY, getClickConsumer, getComponentId, getComponents, getCurrentAppearance, getFont, getHeight, getHoverConsumer, getHoverSound, getLocation, getMouseDraggedConsumer, getMouseEnterConsumer, getMouseLeaveConsumer, getMouseMovedConsumer, getMousePressedConsumer, getMouseReleasedConsumer, getMouseWheelConsumer, getName, getShape, getTag, getText, getTextAlign, getTextAngle, getTextShadowColor, getTextShadowRadius, getTextToRender, getTextValign, getTextX, getTextY, getTweenValues, getWidth, getX, getY, hasAutomaticLineBreaks, hasTextAntialiasing, hasTextShadow, 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, removeListener, removeListener, render, setAutomaticLineBreaks, setDimension, setEnabled, setFont, setFontSize, setForwardMouseEvents, setHeight, setHovered, setHoverSound, setLocation, setLocation, setName, setSelected, setTag, setText, setTextAlign, setTextAngle, setTextAntialiasing, setTextShadow, setTextShadowColor, setTextShadowRadius, setTextValign, setTextX, setTextY, setTweenValues, setVisible, setWidth, setX, setY, suspend, toggleSelection, toggleSuspension
-
Constructor Details
-
Menu
-
Menu
public Menu(double x, double y, double width, double height, Spritesheet background, String... items)
-
-
Method Details
-
getCurrentSelection
public int getCurrentSelection() -
onChange
-
prepare
public void prepare()Description copied from class:GuiComponentPrepare the GuiComponent and all its child Components (Makes the GuiComponent visible and adds mouse listeners.). This is, for example, done right before switching to a new screen.- Overrides:
preparein classImageComponentList
-
setCurrentSelection
public void setCurrentSelection(int currentSelection)
-