Skip to content

IOverlayParent ​

com.jsmacrosce.wagyourgui.overlays.IOverlayParent

Parent contract for overlay operations in the WagYourGUI hierarchy, implemented by BaseScreen and OverlayContainer.

js
const Client = Java.type("com.jsmacrosce.jsmacros.client.JsMacrosClient");  
const parent = Client.prevScreen;  
if (parent !== null) {
  Chat.log(parent.getChildOverlay() !== null);  
}

Methods ​

closeOverlay ​

closeOverlay(OverlayContainer overlay): void#
Requests that the given overlay be closed through this hierarchy.

Parameters:

  • overlay: overlay to close in this hierarchy

getChildOverlay ​

getChildOverlay(): OverlayContainer#
Returns the deepest nested overlay.
Returns: the deepest overlay, or this overlay when the receiver has no child, or null when a screen has no overlay

setFocused ​

setFocused(GuiEventListener focused): void#
Sets the focused GUI listener for the owning screen.

Parameters:

  • focused: listener to focus, or null to clear focus