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 booleanaddItem(String item)Adding item to the list.voidclear()Clear listColorgetItemColor()GUIPanegetPane()ColorgetSelectedColor()StringgetSelectedItem()voidonRender()In this method the GameObject gets rendered onto the screen (if it has an graphical representation).voidonUpdate()This method gets called every frame before the render method.booleanremoveItem(String item)Removing item from listintsize()-
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:GameObjectThis method gets called every frame before the render method. Here is place for the GameObject logic updates, e.g. input handling, physics, actions, ...- Overrides:
onUpdatein 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:GameObjectIn this method the GameObject gets rendered onto the screen (if it has an graphical representation). Its primary used for MasterRenderer calls.- Overrides:
onRenderin classGameObject
-
getSelectedColor
public Color getSelectedColor()
- Returns:
- Read/Writeable color of a selected item
-
getItemColor
public Color getItemColor()
- Returns:
- Read/Writeable color of a item
-
-