Lua API
On this page

Hud

Inherits from

Window hud

Fields:

DontDrawDefaultWindow boolean

If this is true, you manage showing/hiding/drawing your own window. Use ShouldShow / ShouldHide events

LastPreRenderTimeMS number

read only

The time it took to run the most recent PreRender event for this hud, in milliseconds.

LastRenderTimeMS number

read only

The time it took to run the most recent Render event for this hud, in milliseconds.

Name string

read only

Name of the hud. This should be unique to your window. Two windows with the same name will share state.

ShowInBar boolean

Wether to show this hud in the bar

Title string

Window title if not using CustomWindowDrawing

Visible boolean

Wether the window is visible or not. If CustomWindowDrawing is true, this only reflects what the bar thinks. It's up to you to use ShouldShow/ShouldHide to manage its actual state.

WindowSettings ImGuiWindowFlags

Window settings flags

Events:

OnCreateTextures EventArgs

Fired after the device is reset. You should recreate your textures here.

OnDestroyTextures EventArgs

Fired before the device is reset, you should unload any textures you have, and recreate them inside the CreateTextures event.

OnHide EventArgs

When this is raised, hide your hud if you are managing your own windows

OnPreRender EventArgs

Use this to set state for the next window, like with ImGui::SetNextWindowPos

OnRender EventArgs

When this is raised, redraw your hud

OnShow EventArgs

When this is raised, show your hud if you are managing your own windows

Methods:

Dispose() : nil

Destroy the hud

Returns:nil

GetPropertyKeys() : string[]

Returns a list of strings of all public property / field names. Useful for reflection on UserData in lua scripts

Returns:string[]

ToString() : string

Returns a string that represents the current object.

Returns:string