API Reference
Complete API reference for MudForge plugin development.
Categories
- Drawing Functions - Shapes, gradients, canvas operations
- Text Functions - Text rendering, fonts, ANSI colors
- Image Functions - Image loading and rendering
- Widget Functions - Widget lifecycle and management
- MUD Interaction - Sending commands, echoing text
- Triggers, Aliases & Timers - Automation
- Variables & Persistence - Data storage
- Protocol Functions - GMCP and MSDP access
- Multi-Session Functions - Cross-session operations
- Utility Functions - Helpers and utilities
- Lua Standard Libraries - table, math, string, os, io
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