Class HudLayoutElement

java.lang.Object
com.render.api.HudLayoutElement

public final class HudLayoutElement extends Object
Top-level movable managed HUD element owned by a ManagedHudLayout.

Passive modern descendants participate in the same retained compositor as managed screens, including transformed clips, masks, foreground filters, and clipped live-game backdrop filters. Effect bounds and masks retain the HUD's top-left screen-space mapping and this element's saved placement scale. HUD validation still rejects focus, scrolling, interaction, and overlay ownership.

Managed HUD elements use GuiUiMode.MODERN by default. Select GuiUiMode.LEGACY explicitly through uiMode(GuiUiMode) when the original retained runtime is required.

  • Constructor Details

  • Method Details

    • id

      public String id()
    • defaultPlacement

      public HudPlacement defaultPlacement()
    • root

      public ContainerComponent root()
    • layer

      public HudLayoutElement layer(int layer)
    • layer

      public int layer()
    • visible

      public HudLayoutElement visible(boolean visible)
    • visible

      public boolean visible()
    • uiMode

      public HudLayoutElement uiMode(GuiUiMode uiMode)
      Selects legacy or modern retained styling for this passive HUD element.
      Parameters:
      uiMode - runtime mode
      Returns:
      this element
    • uiMode

      public GuiUiMode uiMode()
    • styleSheet

      public HudLayoutElement styleSheet(GuiStyleSheet styleSheet)
      Appends a typed stylesheet for this HUD element.
      Parameters:
      styleSheet - stylesheet
      Returns:
      this element
    • styleSheets

      public List<GuiStyleSheet> styleSheets()
    • editorSetting

      public HudLayoutElement editorSetting(HudEditorSetting setting)
      Registers a named slider or toggle shown only while this element is selected in the managed HUD editor.
      Parameters:
      setting - developer-defined editor setting
      Returns:
      this element
    • editorSlider

      public HudLayoutElement editorSlider(String name, double initialValue, double min, double max, double step, DoubleConsumer onChange)
      Adds a slider backed by an initial value and a player-change callback.
    • editorSlider

      public HudLayoutElement editorSlider(String name, double min, double max, double step, DoubleSupplier getter, DoubleConsumer setter)
      Adds a slider bound to a live component or mod property.
    • editorToggle

      public HudLayoutElement editorToggle(String name, boolean initialValue, Consumer<Boolean> onChange)
      Adds a toggle backed by an initial value and a player-change callback.
    • editorToggle

      public HudLayoutElement editorToggle(String name, BooleanSupplier getter, Consumer<Boolean> setter)
      Adds a toggle bound to a live component or mod property.
    • editorSettings

      public List<HudEditorSetting> editorSettings()
      Returns the settings registered for this element in declaration order.