Objects

Info

Properties

NameTypeDescription
idstringThe ID of the info pill.
visiblebooleanWhether the info pill is visible.
labelstring?The label of the info pill.
stylestring?The CSS style of the info pill.
contentstringThe content of the info pill.
wrapboolean?Whether the content should be wrapped in its default container.

Functions

update_visible(value)

Update the visibility of the info pill.

Parameters

ParameterTypeDescription
valuebooleanWhether the info pill should be visible.

Example

client.lua
local info = exports.rhud:create_info({ ... })
 
info:update_visible(true)

update_label(value)

Update the label of the info pill.

Parameters

ParameterTypeDescription
valuestringThe label of the info pill.

Example

client.lua
local info = exports.rhud:create_info({ ... })
 
info:update_label('New Label')

update_style(value)

Update the CSS style of the info pill.

Parameters

ParameterTypeDescription
valuestringThe CSS style of the info pill.

Example

client.lua
local info = exports.rhud:create_info({ ... })
 
info:update_style([[
  .my-class {
    color: red;
  }
]])

update_content(value, wrap)

Update the content of the info pill.

Parameters

ParameterTypeDescription
valuestringThe content of the info pill.
wrapboolean?Whether the content should be wrapped in its default container.

Example

client.lua
local info = exports.rhud:create_info({ ... })
 
info:update_content('New Content', true)

update_wrap(value)

Update the wrap of the info pill.

Parameters

ParameterTypeDescription
valuebooleanWhether the content should be wrapped in its default container.

Example

client.lua
local info = exports.rhud:create_info({ ... })
 
info:update_wrap(false)

Footnotes

On this page