Hooks
Hooks provided by the Cursor module for custom cursor rendering and interaction.
Overview
The Cursor module provides a toggleable custom cursor system for improved UI navigation and interaction. It offers client-side cursor rendering with hotkey controls, enhanced menu compatibility, and smooth cursor transitions. The module includes comprehensive hook integration for customizing cursor behavior, rendering, and interaction events.
CursorThink
đ Purpose
Called every frame when the cursor is active and a panel is being hovered.
â° When Called
During the Think hook when a custom cursor material is set and a valid panel is hovered.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
hoverPanel |
Panel | The VGUI panel currently being hovered by the cursor |
âŠī¸ Returns
nil
đ Realm
Client
PostRenderCursor
đ Purpose
Called after the custom cursor has been rendered.
â° When Called
After the cursor drawing operation completes in PostRenderVGUI.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
cursorMaterial |
string | The material path of the cursor being rendered |
âŠī¸ Returns
nil
đ Realm
Client
PreCursorThink
đ Purpose
Called before the cursor Think logic processes the hovered panel.
â° When Called
During the Think hook, before setting the panel cursor to blank.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
hoverPanel |
Panel | The VGUI panel currently being hovered by the cursor |
âŠī¸ Returns
nil
đ Realm
Client
PreRenderCursor
đ Purpose
Called before the custom cursor is rendered.
â° When Called
Before the cursor drawing operation begins in PostRenderVGUI.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
cursorMaterial |
string | The material path of the cursor to be rendered |
âŠī¸ Returns
nil
đ Realm
Client