Class GuiInputContext

java.lang.Object
com.render.api.gui.GuiInputContext

public final class GuiInputContext extends Object
Public input surface supplied to custom retained components.

Pointer callback coordinates are already inverse-transformed design coordinates. Subtract bounds() to obtain border-box local coordinates. localPoint(float, float) also converts a global design point through the complete ancestor transform chain. The host reuses this wrapper; it is valid only during an input callback and must not be retained.

  • Method Details

    • bounds

      public GuiRect bounds()
      Returns:
      the input owner's untransformed border box in design coordinates
    • contentBounds

      public GuiRect contentBounds()
      Returns:
      the input owner's untransformed content box in design coordinates
    • localX

      public float localX(float callbackX)
      Converts a callback's already inverse-transformed X coordinate to border-box local X.
    • localY

      public float localY(float callbackY)
      Converts a callback's already inverse-transformed Y coordinate to border-box local Y.
    • localPoint

      public GuiTransform.Point localPoint(float designX, float designY)
      Converts global design coordinates to coordinates relative to the input owner's border-box top-left.
    • designPoint

      public GuiTransform.Point designPoint(float localX, float localY)
      Converts border-box local coordinates to global design coordinates, including ancestor transforms.
    • requestFocus

      public void requestFocus()
      Requests focus for this component on the next host input/preparation sample.
    • focused

      public boolean focused()
      Returns:
      whether this component currently owns keyboard focus
    • timeSeconds

      public double timeSeconds()
      Returns:
      the host's current controlled animation sample