Macho DUI

This page will cover our screenshot-proof DUI menus API.

MachoCreateDui([string] url) -> dui_handle

This will create a DUI window, rendering is handled by us in the backend. The default dimensions are the same as the games resolution. By default, this menu is hidden.

MachoShowDui([dui_handle] dui) -> void
MachoHideDui([dui_handle] dui) -> void

These can be used to show/hide the DUI menu, you could also use transparency in the DUI menu itself instead. They are just designed to aid debugging, and also allow a period whilst the menu loads.

MachoDestroyDui([dui_handle] dui) -> void

Destroys a DUI window.

MachoSendDuiMessage([dui_handle] dui, [string] json) -> void

This will post a message event to the DUI window. You can catch this using window.addEventListener("message", ...) inside your javascript code on the page.

MachoExecuteDuiScript([dui_handle] dui, [string] script) -> void

This allows you to inject javascript code directly into your DUI window. This could be used to run your UI using purely javascript, so it can be self-contained within your lua code.