Class List
- java.lang.Object
-
- de.coreengine.system.GameObject
-
- de.coreengine.system.gameObjects.gui.List
-
public class List extends GameObject
List gui element- Author:
- Darius Dinger
-
-
Field Summary
-
Fields inherited from class de.coreengine.system.GameObject
parent
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addItem(String item)
Adding item to the list.void
clear()
Clear listColor
getItemColor()
GUIPane
getPane()
Color
getSelectedColor()
String
getSelectedItem()
void
onRender()
In this method the GameObject gets rendered onto the screen (if it has an graphical representation).void
onUpdate()
This method gets called every frame before the render method.boolean
removeItem(String item)
Removing item from listint
size()
-
Methods inherited from class de.coreengine.system.GameObject
addActionToPhysicWorld, addChild, addRigidBodyToWorld, getScene, onAdd, onInit, onLoad, onPauseUpdate, onRemove, onSave, onSyncronize, removeChild, setShouldRender, setShouldSyncronize, setShouldUpdate
-
-
-
-
Method Detail
-
addItem
public boolean addItem(String item)
Adding item to the list. If item already exist in the list it return false else it returns true- Parameters:
item
- Item to add- Returns:
- Could the item be added
-
clear
public void clear()
Clear list
-
size
public int size()
- Returns:
- Itemcount of the list
-
removeItem
public boolean removeItem(String item)
Removing item from list- Parameters:
item
- Item name to remove- Returns:
- Could the item be removed
-
onUpdate
public void onUpdate()
Description copied from class:GameObject
This method gets called every frame before the render method. Here is place for the GameObject logic updates, e.g. input handling, physics, actions, ...- Overrides:
onUpdate
in classGameObject
-
getSelectedItem
public String getSelectedItem()
- Returns:
- Current selected item of the list or null, if no item is selected
-
getPane
public GUIPane getPane()
- Returns:
- Main pane of the list
-
onRender
public void onRender()
Description copied from class:GameObject
In this method the GameObject gets rendered onto the screen (if it has an graphical representation). Its primary used for MasterRenderer calls.- Overrides:
onRender
in classGameObject
-
getSelectedColor
public Color getSelectedColor()
- Returns:
- Read/Writeable color of a selected item
-
getItemColor
public Color getItemColor()
- Returns:
- Read/Writeable color of a item
-
-