Skip to main content

User Interface

How to display information in the Screen for the Player.

In HELIX there are 2 official ways of plotting screen data: WebUI and Canvas.


We highly recommend using WebUI instead of Canvas to create your UIs 😉.


With WebUI you can load HTML pages which integrate with your Packages in Lua using Events.

Basic WebUI Setup

This sample code shows how to add a basic page using HTML+JavaScript with the WebUI class.


Note: All WebUI code runs on Client side!

-- Spawns a WebUI with the HTML file you just created
MyUI = WebUI("My UI", "file://UI/index.html")

-- When the HTML is ready, triggers an Event in there
MyUI:Subscribe("Ready", function()
MyUI:CallEvent("MyAwesomeEvent", "Hello! You are ready!")

MyUI:Subscribe("MyAwesomeAnswer", function(param1)
Console.Log("Received an answer! Message: " .. param1)
<script src="index.js"></script>
Hello World!
// Register for "MyAwesomeEvent" from Lua
Events.Subscribe("MyAwesomeEvent", function(param1) {
console.log("Triggered! " + param1);

// Triggers "MyAwesomeAnswer" on Lua
Events.Call("MyAwesomeAnswer", "Hey there!");

WebUI results

This will output:

[WebUI]  Triggered! Hello! You are ready!
[Script] Received an answer! Message: Hey there!
Basic HUD (HTML)getting-started/code-examples/basic-hud-html