WebUI Quick Start¶
The following code runs on Client.
Inside your Package’s Client folder, create a new folder (optional) called
UI to separate the UI files from the Scripting (lua) files:
UI let’s create a simple HTML file
index.html which you can write your own HTML code:
In your Package’s Index.lua, create the WebUI:
Adding Events and Callbacks to communicate with your Package¶
First, create a file
And let’s modify our HTML to include our
index.js) to communicate with your Package:
Let’s modify our Lua code to add some handles for JS events:
Results (on console):¶
[WebUI] Triggered! Hello! You are ready!
[Script] Received an answer! Message: Hey there!