Skip to content

Detailed API Reference

This is the function-level reference for the MGFX public API. Start with Use MGFX if you are setting up a project, and read API Overview for the conceptual model.

MGFX has two public surfaces:

text
Lux                 mgfx.api.roundedBoxEx(...)
Plain GLua facade   MGFX.RoundedBoxEx(...)

The detailed pages are grouped by topic for reading, not by import path. Lux examples use mgfx.api.*; the installed facade uses the same operation names in PascalCase.

Choose by Task

NeedRead firstMain entry points
Panels, buttons, badges, arrows, convex polygonsPrimitivesroundedBoxEx, chamferBoxEx, regularPolyEx, diamondEx, caretEx, polyEx
Avatars, icons, cropping, rounded/chamfer/texture masksImages and MasksimageEx, iconEx, mask
Health bars, ammo pips, rings, gauges, wheel sectorsWidgetsprogressBarEx, segmentBarEx, ringEx, arcEx, sectorEx
Plain labels, outlined text, glow titles, text boxesText APItext, textEx, textBoxEx, measureTextBox
Gradients, stops, patterns, draw transformsPaint, Patterns, Transforms, and CapabilitieslinearGradient, radialGradient, sectorAngularGradient, stripePattern, pointerTilt
VGUI Paint / HUDPaint lifecycleFrame Scope and DebuggingstartPanel, startScreen, pushClip, debugOverlay

For ordinary controls, use the short signature or the matching Ex style table. Avoid adding a second helper layer unless it removes real project-level duplication.

Groups

Reading Order

  • New Lux code should import @lux/mgfx and call mgfx.api.*.
  • Existing GLua code may call the installed MGFX.* facade after mgfx.installGlobal("MGFX").
  • When changing public behavior, update the overview and the relevant detailed family page together.