Class ClientWindowVisibility

java.lang.Object
com.trevlar.menukit.window.ClientWindowVisibility

public final class ClientWindowVisibility extends Object
The one client-side gate that folds the engine VISIBILITY behavior into the panel dispatch — the bridge between "set visibility through the window" and "the renderer/input loop actually honors it."

Why this and not Panel.isVisible()

Panel.isVisible() (the panel's own field / showWhen supplier) is called on BOTH sides — a created slot's server-side MKCSlot.isInert reads it for sync. Engine VISIBILITY is CLIENT-tier and MUST be resolved on the client only (the engine store is shared client+server in single-player, so resolving it server-side would let a client hide stop server sync). So the engine resolution lives here, called ONLY from the client render/input dispatch — never from Panel.isVisible() or any server path.

Additive

Each method ANDs the existing visibility with the resolved VisibilityRule. With no VISIBILITY declared the rule resolves to VisibilityRule.VISIBLE, so panelShown == panel.isVisible() — zero behavior change until a consumer sets it. Panel-level VISIBILITY cascades to child elements via the engine's owner-chain walk, so elementShown(Panel, PanelElement) also reflects a hidden parent panel.
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    elementShown(Panel panel, PanelElement element)
    Client-side: should this element of panel display/interact (own visibility AND engine VISIBILITY)?
    static boolean
    Client-side: is this panel interaction-opaque (eats clicks over its bounds)? The panel's own isOpaque() AND the engine OPACITY key.
    static boolean
    Client-side: should this panel display/interact this frame (own visibility AND engine VISIBILITY)?

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • panelShown

      public static boolean panelShown(Panel panel)
      Client-side: should this panel display/interact this frame (own visibility AND engine VISIBILITY)?
    • elementShown

      public static boolean elementShown(Panel panel, PanelElement element)
      Client-side: should this element of panel display/interact (own visibility AND engine VISIBILITY)?
    • panelOpaque

      public static boolean panelOpaque(Panel panel)
      Client-side: is this panel interaction-opaque (eats clicks over its bounds)? The panel's own isOpaque() AND the engine OPACITY key. Additive (OPACITY defaults TRUE, so this equals isOpaque() until set through the window). Resolved by panel address, client-side.