Class PlayerCustomHudWrapper


public class PlayerCustomHudWrapper extends PlayerQuantityHudWrapper
Wrapper for a custom player HUD that can display a list of font images.
  • Constructor Details

    • PlayerCustomHudWrapper

      public PlayerCustomHudWrapper(PlayerHudsHolderWrapper playerHUDsHolderWrapper, String namespacedID)
      Creates a custom HUD wrapper.
      Parameters:
      playerHUDsHolderWrapper - the player's HUD holder wrapper.
      namespacedID - the HUD namespaced id.
  • Method Details

    • clearFontImagesAndRefresh

      public void clearFontImagesAndRefresh()
      Removes all font images and recalculates HUD offsets.
    • setFontImages

      public void setFontImages(List<FontImageWrapper> fontImageWrappers)
      Replaces all font images displayed by this HUD.
      Parameters:
      fontImageWrappers - the new font images.
    • removeFontImageByIndex

      public void removeFontImageByIndex(int index)
      Removes a font image by index.
      Parameters:
      index - the image index.
    • addFontImageToIndex

      public void addFontImageToIndex(FontImageWrapper fontImageWrapper, int index)
      Adds a font image at a specific index.
      Parameters:
      fontImageWrapper - the font image wrapper.
      index - the insertion index.
    • addFontImage

      public void addFontImage(FontImageWrapper fontImageWrapper)
      Adds a font image at the end of the HUD image list.
      Parameters:
      fontImageWrapper - the font image wrapper.
    • getFontImagesCount

      public int getFontImagesCount()
      Gets the amount of font images displayed by this HUD.
      Returns:
      the font image count.