Skip to Content
API ReferenceOverview

API Reference

Complete API reference for MudForge plugin development.

Categories

Getting Started

print("Loading...") local widget = createWidget({ type = "canvas", title = "Demo", width = 200, height = 100 }) local function draw() clear("#1e1e2e") drawRect(10, 10, 180, 80, "#89b4fa") drawText("Hello!", 70, 55, "#cdd6f4") end registerWidgetEvent(widget, "resize", function() draw() end) function init() draw() end print("Loaded!")

This shows the essential pattern:

  • createWidget - Create a canvas
  • draw function - Your drawing code
  • registerWidgetEvent - Redraw on resize
  • init() - Initial draw when canvas is ready
Last updated on