Class ToolbarDisplay
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.rendering.RenderComponent
com.csse3200.game.ui.UIComponent
com.csse3200.game.components.inventory.ToolbarDisplay
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
,com.badlogic.gdx.utils.Json.Serializable
,Renderable
,Comparable<Renderable>
Display the UI for the toolbar
-
Field Summary
Fields inherited from class com.csse3200.game.ui.UIComponent
skin, stage
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
create()
Creates the event listeners, ui, and gets the UI.void
draw
(com.badlogic.gdx.graphics.g2d.SpriteBatch batch) Draw stage for rendervoid
hide()
Hide the toolbar.void
setPause()
void
Toggle Toolbar to open statevoid
Updates the player's inventory toolbar on the ui.Methods inherited from class com.csse3200.game.ui.UIComponent
getLayer, getZIndex
Methods inherited from class com.csse3200.game.rendering.RenderComponent
compareTo, dispose, render
Methods inherited from class com.csse3200.game.components.Component
earlyUpdate, getEntity, read, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.csse3200.game.rendering.Renderable
render
-
Constructor Details
-
ToolbarDisplay
public ToolbarDisplay()
-
-
Method Details
-
create
public void create()Creates the event listeners, ui, and gets the UI.- Overrides:
create
in classUIComponent
-
setPause
public void setPause() -
draw
public void draw(com.badlogic.gdx.graphics.g2d.SpriteBatch batch) Draw stage for render- Specified by:
draw
in classRenderComponent
- Parameters:
batch
- Batch to render to.
-
toggleOpen
public void toggleOpen()Toggle Toolbar to open state -
hide
public void hide()Hide the toolbar. But why would you ever want to do that? -
updateInventory
public void updateInventory()Updates the player's inventory toolbar on the ui. -
addTooltips
public void addTooltips()
-