# AboutOverlay

`com.jsmacrosce.jsmacros.client.gui.overlays.AboutOverlay`

WagYourGUI about-information overlay with close, Website, Discord, and Modrinth buttons; it is not a global HUD library.  
 The constructor takes an overlay parent and native font, but no message. Set a custom native text
 component with `setMessage` after opening, since initialization resets the default about information.  
 In this factory, the caller supplies an `IOverlayParent`, native `Font`, and native `Component`:  
 ```js
function showAbout(parent, font, message) {
  const AboutOverlay = Java.type('com.jsmacrosce.jsmacros.client.gui.overlays.AboutOverlay');  
  const overlay = new AboutOverlay(10, 10, 220, 140, font, parent);  
  parent.openOverlay(overlay);  
  overlay.setMessage(message);  
}
 ```

## Constructors

### new AboutOverlay {#com.jsmacrosce.jsmacros.client.gui.overlays.AboutOverlay_constructor-int-int-int-int-Font-IOverlayParent-}

```js
new AboutOverlay(int x, int y, int width, int height, Font textRenderer, IOverlayParent parent)
```

Stores the overlay bounds, font, and parent; it does not open or initialize the overlay.

**Parameters:**
- `x`: left screen GUI coordinate
- `y`: top screen GUI coordinate
- `width`: overlay width
- `height`: overlay height
- `textRenderer`: non-null font used to measure and draw text
- `parent`: non-null overlay host used to register widgets and close this overlay

## Methods

### init {#com.jsmacrosce.jsmacros.client.gui.overlays.AboutOverlay_init-}

```js
init(): void
```

Registers the close and external-link buttons and resets the message to the default about information.  
 Reinitialization clears this container's button tracking before registering replacements, but does not
 unregister the previously registered widgets from the parent. The close button requests closing through
 the parent; the other buttons request platform URI opening without guaranteeing an external outcome.

### render {#com.jsmacrosce.jsmacros.client.gui.overlays.AboutOverlay_render-GuiGraphics-int-int-float-}

```js
render(GuiGraphics drawContext, int mouseX, int mouseY, float delta): void
```

Submits the background, title, cached message and separators, then forwards the hook to widgets and a child overlay.  
 The cached message layout is not recomputed here; only its selected leading lines are submitted, each
 horizontally centered using its measured width and positioned using the cached vertical offset.  
 This method does not consult the inherited visibility flag.

**Parameters:**
- `drawContext`: graphics context receiving the overlay contents
- `mouseX`: current mouse x-coordinate, forwarded to widgets and child overlay
- `mouseY`: current mouse y-coordinate, forwarded to widgets and child overlay
- `delta`: frame value forwarded to widgets and child overlay

### setMessage {#com.jsmacrosce.jsmacros.client.gui.overlays.AboutOverlay_setMessage-Component-}

```js
setMessage(Component message): void
```

Wraps and caches the message for the current bounds and font; only the leading cached lines are drawn.  
 Wrapping uses the current width minus six; the visible-line count and vertical offset are cached.  
 Call again after changing the bounds or font to refresh the layout. A nonempty split selects at least
 one line even in a short overlay; this does not guarantee that the selected lines fit.

**Parameters:**
- `message`: non-null text component to wrap and display
