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 TypeMethodDescriptionvoidvoidcreate()Creates the event listeners, ui, and gets the UI.voiddraw(com.badlogic.gdx.graphics.g2d.SpriteBatch batch) Draw stage for rendervoidhide()Hide the toolbar.voidsetPause()voidToggle Toolbar to open statevoidUpdates the player's inventory toolbar on the ui.Methods inherited from class com.csse3200.game.ui.UIComponent
getLayer, getZIndexMethods inherited from class com.csse3200.game.rendering.RenderComponent
compareTo, dispose, renderMethods inherited from class com.csse3200.game.components.Component
earlyUpdate, getEntity, read, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update, writeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods 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:
createin classUIComponent
-
setPause
public void setPause() -
draw
public void draw(com.badlogic.gdx.graphics.g2d.SpriteBatch batch) Draw stage for render- Specified by:
drawin 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()
-