GetUIFloatAlt

From GECK
Jump to: navigation, search


A function added by the New Vegas Script Extender version 6.0.8.

Description

Looks up a UI trait by name and returns its numeric float value. The trait name is of the format "MenuName/ElementName/ElementName/.../TraitName" as defined in the XML hierarchy for the desired menu, i.e. "MessageMenu/NoGlow_Branch/MM_Title/x". Returns -999 if UI trait was not found. Supersedes GetUIFloat, which is bugged for templated children tiles.

Syntax

[help]
(float) GetUIFloatAlt traitName:string

Example

GetUIFloatAlt "RepairServicesMenu/NOGLOW_BRANCH/RSM_MainRect/RSM_RepairList/RSM_RepairListTemplateRect:4/string"

Returns the name of the 4th item on the Repair Services menu.

GetUIFloatAlt "BarterMenu/*:0/*:5/*:9/lb_scrollbar/_number_of_items"

Returns the number of items in the Barter menu.

Notes

  • The traitName argument to Get/SetUI(Float/String) has two extra capabilities. A path segment of "*" matches any child tile, and a path segment suffix of ":N" matches the N'th child tile. This is useful when accessing list box items, where the tile names are either identical, or unpredictable, or both.
  • Do not use this command with MCM since it depends on bugged behaviour. Instead use GetUIFloat.

See Also