|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.rico.adventure.inventory.AbstractInventory
de.rico.adventure.inventory.BarInventory
public class BarInventory
This class represents an inventory that uses a bar at the top of the screen to visualize the items in the inventory.
Constructor Summary | |
---|---|
BarInventory(int height,
int space,
Color4f hoverColor,
InputManager input)
Creates a new inventory system that uses a bar at the top of the screen to visualize the items in the inventory. |
|
BarInventory(int height,
int space,
InputManager input)
Creates a new inventory system that uses a bar at the top of the screen to visualize the items in the inventory. |
Method Summary | |
---|---|
void |
draw(javax.media.opengl.GL gl)
The method draws the inventory, when visible |
boolean |
isMouseOverItem(Item item)
Determines whether or not the mouse is located over the specified inventory item. |
void |
update(long elapsedTime)
This method updates the inventory. |
Methods inherited from class de.rico.adventure.inventory.AbstractInventory |
---|
add, contains, getBGColor, getHeight, getItems, getItemUnderCursor, getSelectedInventoryItem, getTextColor, getWidth, getX, getY, isMouseInInventory, isVisible, remove, setBGColor, setHeight, setSelectedInventoryItem, setTextColor, setVisible, setWidth, setX, setY |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BarInventory(int height, int space, InputManager input)
height
- height of the inventory bar in pixelsspace
- between two item picturesinput
- input manager objectpublic BarInventory(int height, int space, Color4f hoverColor, InputManager input)
height
- height of the inventory bar in pixelsspace
- between two item pictureshoverColor
- item imgages hover colorinput
- input manager objectMethod Detail |
---|
public boolean isMouseOverItem(Item item)
AbstractInventory
isMouseOverItem
in class AbstractInventory
item
- item in the inventory to check
public void draw(javax.media.opengl.GL gl)
AbstractInventory
draw
in class AbstractInventory
public void update(long elapsedTime)
AbstractInventory
update
in class AbstractInventory
elapsedTime
- time between two frames
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |