Class UpgradesTab
java.lang.Object
com.csse3200.game.ui.inventoryscreen.UpgradesTab
- All Implemented Interfaces:
InventoryTabInterface
-
Constructor Summary
ConstructorsConstructorDescriptionUpgradesTab
(Entity player, MainGameScreen gameScreen) Creates an Upgrades tab bound to the given main game screen. -
Method Summary
Modifier and TypeMethodDescriptioncom.badlogic.gdx.scenes.scene2d.Actor
build
(com.badlogic.gdx.scenes.scene2d.ui.Skin skin) Builds the UI actor tree for the upgrades tab The background is placed using a pixel-perfect placer and scaled to two thirds of the current screen height while preserving aspect ratio.
-
Constructor Details
-
UpgradesTab
Creates an Upgrades tab bound to the given main game screen.- Parameters:
player
- entity holding upgrades informationgameScreen
- main game screen used to unpause and hide the pause menu
-
-
Method Details
-
build
public com.badlogic.gdx.scenes.scene2d.Actor build(com.badlogic.gdx.scenes.scene2d.ui.Skin skin) Builds the UI actor tree for the upgrades tab The background is placed using a pixel-perfect placer and scaled to two thirds of the current screen height while preserving aspect ratio. An invisible button is overlaid at a fixed pixel rectangle to act as the close hotspot- Specified by:
build
in interfaceInventoryTabInterface
- Parameters:
skin
- UI skin used for widget construction- Returns:
- a root table containing the objectives content
-