Class PanelBase<T extends IPanelItem>

All Implemented Interfaces:
IRenderable2D, org.rusherhack.core.interfaces.IClickable, org.rusherhack.core.interfaces.IHideable, org.rusherhack.core.interfaces.IHoverable, org.rusherhack.core.interfaces.INamed, org.rusherhack.core.interfaces.IScrollable, org.rusherhack.core.interfaces.ITickable, org.rusherhack.core.interfaces.ITypeable, org.rusherhack.core.serialize.ISerializable<com.google.gson.JsonElement>, org.rusherhack.core.serialize.JsonSerializable

public abstract class PanelBase<T extends IPanelItem> extends ScaledElementBase implements IRenderable2D, org.rusherhack.core.interfaces.ITickable, org.rusherhack.core.interfaces.IClickable, org.rusherhack.core.interfaces.IScrollable, org.rusherhack.core.interfaces.ITypeable, org.rusherhack.core.interfaces.IHideable, org.rusherhack.core.serialize.JsonSerializable, org.rusherhack.core.interfaces.INamed
Basic panel element that with items that can be clicked
  • Field Details

    • items

      protected final List<T extends IPanelItem> items
      Items that should be contained in this panel
  • Constructor Details

  • Method Details

    • createFeatureItem

      public abstract T createFeatureItem(org.rusherhack.core.feature.IFeature feature)
      Instantiates a new item for the given feature
      Parameters:
      feature - likely a module or hud element
      Returns:
      the item
    • addItem

      public T addItem(T item)
    • addItem

      public T addItem(org.rusherhack.core.feature.IFeature feature)
    • getItemList

      public List<T> getItemList()
    • getName

      public String getName()
      Specified by:
      getName in interface org.rusherhack.core.interfaces.INamed
    • isHidden

      public boolean isHidden()
      Specified by:
      isHidden in interface org.rusherhack.core.interfaces.IHideable
    • setVisible

      public void setVisible(boolean visible)
    • getRenderer

      public IRenderer2D getRenderer()
      Specified by:
      getRenderer in interface IRenderable2D
    • getFontRenderer

      public IFontRenderer getFontRenderer()
      Specified by:
      getFontRenderer in interface IRenderable2D
    • serialize

      public com.google.gson.JsonElement serialize()
      Specified by:
      serialize in interface org.rusherhack.core.serialize.ISerializable<T extends IPanelItem>
    • deserialize

      public boolean deserialize(com.google.gson.JsonElement obj)
      Specified by:
      deserialize in interface org.rusherhack.core.serialize.ISerializable<T extends IPanelItem>