public class CraftingHud extends Hud
Modifier and Type | Field and Description |
---|---|
static float |
BACK_BUTTON_X_OFFSET
Stores the offset used to anchor the back button to the bottom-right of the backpack background with a certain padding.
|
static float |
BACK_BUTTON_Y_OFFSET |
static float |
CRAFT_BUTTON_X_OFFSET
Stores the offset used to anchor the craftButton to the bottom-right of the backpack background.
|
static float |
CRAFT_BUTTON_Y_OFFSET |
static float |
CRAFTING_TABLE_X_OFFSET
Holds the offset used to anchor the crafting table to the left of the backpack background.
|
static float |
CRAFTING_TABLE_Y_OFFSET |
static float |
HEADER_X_OFFSET
Holds the offset used to anchor the header to the top-center of the screen.
|
static float |
HEADER_Y_OFFSET |
static float |
INVENTORY_LIST_HEIGHT
Holds the height of the inventory list holding all of the item buttons.
|
static float |
INVENTORY_LIST_X_OFFSET
Holds the offset used to anchor the inventory list to the left of the backpack background.
|
static float |
INVENTORY_LIST_Y_OFFSET |
Constructor and Description |
---|
CraftingHud(com.badlogic.gdx.scenes.scene2d.Stage stage,
com.jonathan.survivor.World world,
Inventory inventory,
ItemManager itemManager)
Accepts the Stage instance where widgets are drawn, and the world, used to manipulate the world according to button presses.
|
Modifier and Type | Method and Description |
---|---|
void |
emptyCraftingTable(boolean transferToInventory)
Removes the items from the crafting table.
|
void |
onBack()
Called when the back button is pressed, or when the game exits.
|
void |
reset(float guiWidth,
float guiHeight)
Called whenever the current Hud of the game switches to the backpack Hud.
|
addHudListener, draw
public static final float INVENTORY_LIST_HEIGHT
public static final float INVENTORY_LIST_X_OFFSET
public static final float INVENTORY_LIST_Y_OFFSET
public static final float CRAFTING_TABLE_X_OFFSET
public static final float CRAFTING_TABLE_Y_OFFSET
public static final float CRAFT_BUTTON_X_OFFSET
public static final float CRAFT_BUTTON_Y_OFFSET
public static final float HEADER_X_OFFSET
public static final float HEADER_Y_OFFSET
public static final float BACK_BUTTON_X_OFFSET
public static final float BACK_BUTTON_Y_OFFSET
public CraftingHud(com.badlogic.gdx.scenes.scene2d.Stage stage, com.jonathan.survivor.World world, Inventory inventory, ItemManager itemManager)
public void reset(float guiWidth, float guiHeight)
public void emptyCraftingTable(boolean transferToInventory)
public void onBack()