LavishGUI:lguihudelement (Data Type)
Jump to navigation
Jump to search
Description
This data type provides and controls data for hudelement (Element Type).
Members
- string Text : text of the HUD element
- string Group : name of the HUD group the element belongs to
- isuifont Font : font the HUD element is written in
- int UpdateInterval : how many frames inbetween updating the element
Methods
- SetText[text] : sets the elements text to <text>
- SetGroup[text] : sets the elements HUD group to <text>
- SetUpdateInterval[#] : set the elements update interval to <#>
Inherits
Returns
Same as lguielement.Name
Examples
Display a HUD element's text
- echo HUD element text: ${UIElement[main hud].FindChild[fps].Text}
- Output
HUD element text: FPS: 14.14
Display a HUD element's group
- echo HUD element group: ${UIElement[main hud].FindChild[fps].Group}
- Output
HUD element group: FPS Indicator
Display a HUD element's font
- echo HUD element font: ${UIElement[main hud].FindChild[fps].Font}
- Output
HUD element font: Terminal
Display a HUD element's HUD interval
- echo HUD element UpdateInterval: ${UIElement[main hud].FindChild[fps].UpdateInterval}
- Output
HUD element UpdateInterval: 4
Set HUD element text
- UIElement[main hud].FindChild[fps]:SetText[FPS \${Display.FPS}]
- Note: without the \ before ${Display.FPS} it will parse the result and you will end up with a constant value instead of updating the FPS continually
Set HUD element group
- UIElement[main hud].FindChild[fps]:SetGroup[New FPS Group]
- This command will change the hud element "FPS" from "FPS Indicator" group to "New FPS Group"
Set HUD element update interval
- UIElement[main hud].FindChild[fps]:SetUpdateInterval[2]
- This command sets the "fps" element to update every 2 frames