Class GameAreaDisplay
java.lang.Object
com.deco2800.game.components.Component
com.deco2800.game.rendering.RenderComponent
com.deco2800.game.ui.UIComponent
com.deco2800.game.components.gamearea.GameAreaDisplay
- All Implemented Interfaces:
 com.badlogic.gdx.utils.Disposable,Renderable,Comparable<Renderable>
Class that allows for overlaying the current map with displays and animation. Used for crafting, inventory, NPCs and
 puase menu
- 
Field Summary
FieldsFields inherited from class com.deco2800.game.ui.UIComponent
skin, stage - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidcreate()Called when the entity is created and registered.com.badlogic.gdx.scenes.scene2d.Actor[]Creates the appropriate image and label entries for key labelling as actors then returns them.voidDisplays the first page of the catalogue menu and adds event handlers for buttonsvoidDisplays the second page of the catalogue menu and adds event handlers for buttons.voidDisplays the items that the player has equipped.voidDisplays the inventory UI.voidDisplays each item in the inventory in the inventory storage blocks.voidvoiddispose()Called when the component is disposed.voidDisposes the crafting menu by deleting all the elements from the screen and also resets the boxes to make it like new when opened again.voidDisposes the inventory display group.voidDispose the keybinding menu groupvoidDisposes of the minimap when it is open and M is pressed.voidMethod that disposes the pause menu by removing all the elements present on the screenvoidRemoves the elements of the player guide menu from the map.voiddraw(com.badlogic.gdx.graphics.g2d.SpriteBatch batch) Draw the renderable.intReturns the file path used for the playerGuideMenu backgroundvoidLoad the all assets required for displaying inventoryvoidOpens an overlay crafting menu when 'Q' is pressed.voidCreates the keybinding menu.voidLoads all the required elements for the overlay when the pause button is pressed by the user.voidsetPlayerGuideMenu(String filePath) Loads the elements required to provide tutorials for the player when first using the crafting system.voidToggles the skill tree displayvoidMethods inherited from class com.deco2800.game.ui.UIComponent
getLayer, getZIndexMethods inherited from class com.deco2800.game.rendering.RenderComponent
compareTo, renderMethods inherited from class com.deco2800.game.components.Component
earlyUpdate, getEntity, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, updateMethods 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.deco2800.game.rendering.Renderable
render 
- 
Field Details
- 
minimapImage
public com.badlogic.gdx.scenes.scene2d.ui.Image minimapImage 
 - 
 - 
Constructor Details
- 
GameAreaDisplay
 
 - 
 - 
Method Details
- 
create
public void create()Description copied from class:ComponentCalled when the entity is created and registered. Initial logic such as calls to GetComponent should be made here, not in the constructor which is called before an entity is finished.- Overrides:
 createin classUIComponent
 - 
getGameAreaName
 - 
displayMinimap
public void displayMinimap() - 
disposeMinimap
public void disposeMinimap()Disposes of the minimap when it is open and M is pressed. - 
updateInventoryDisplay
public void updateInventoryDisplay() - 
initialiseInventoryDisplay
public void initialiseInventoryDisplay()Load the all assets required for displaying inventory - 
displayInventoryMenu
public void displayInventoryMenu()Displays the inventory UI. - 
displayEquipables
public void displayEquipables()Displays the items that the player has equipped. - 
displayItems
public void displayItems()Displays each item in the inventory in the inventory storage blocks. Implemented by Team 2. - 
disposeInventoryMenu
public void disposeInventoryMenu()Disposes the inventory display group. - 
openCraftingMenu
public void openCraftingMenu()Opens an overlay crafting menu when 'Q' is pressed. Creates assets based on users' inventory and creates button event handlers to test for user clicks. - 
setPauseMenu
public void setPauseMenu()Loads all the required elements for the overlay when the pause button is pressed by the user. - 
disposePauseMenu
public void disposePauseMenu()Method that disposes the pause menu by removing all the elements present on the screen - 
setPlayerGuideMenu
Loads the elements required to provide tutorials for the player when first using the crafting system.- Parameters:
 filePath- the asset to be loaded and showed when the tutorial is active.
 - 
getPlayerGuideMenu
Returns the file path used for the playerGuideMenu background- Returns:
 - Filepath of the playerGuideMeny background
 
 - 
disposePlayerGuideMenu
public void disposePlayerGuideMenu()Removes the elements of the player guide menu from the map. - 
setKeyBindMenu
public void setKeyBindMenu()Creates the keybinding menu. Adds the background images, key images, key texts, and next button to navigate the menu. Utilises modulo technique to ensure page changing simply loops. - 
disposeKeyBindMenu
public void disposeKeyBindMenu()Dispose the keybinding menu group - 
createKeyBindings
public com.badlogic.gdx.scenes.scene2d.Actor[] createKeyBindings()Creates the appropriate image and label entries for key labelling as actors then returns them.- Returns:
 - Actor[] Key images and label actors
 
 - 
displayCatOne
public void displayCatOne()Displays the first page of the catalogue menu and adds event handlers for buttons - 
displayCatTwo
public void displayCatTwo()Displays the second page of the catalogue menu and adds event handlers for buttons. - 
disposeCraftingMenu
public void disposeCraftingMenu()Disposes the crafting menu by deleting all the elements from the screen and also resets the boxes to make it like new when opened again. - 
getFirstTime
public int getFirstTime() - 
toggleSkillTree
public void toggleSkillTree()Toggles the skill tree display - 
draw
public void draw(com.badlogic.gdx.graphics.g2d.SpriteBatch batch) Description copied from class:RenderComponentDraw the renderable. Should be called only by the renderer, not manually.- Specified by:
 drawin classRenderComponent- Parameters:
 batch- Batch to render to.
 - 
dispose
public void dispose()Description copied from class:ComponentCalled when the component is disposed. Dispose of any internal resources here.- Specified by:
 disposein interfacecom.badlogic.gdx.utils.Disposable- Overrides:
 disposein classRenderComponent
 
 -