SortUIListBox

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
< [[::Category:Functions|Category:Functions]]

A function included in the GECK Version 1.1.0.262 for Fallout: New Vegas.

Description

Reorders a UI list box such as the item list of the Barter menu.

Syntax

[help]
SortUIListBox pathName:string sortSpec:string

Example

SortUIListBox "BarterMenu/*:0/*:5/*:9" "-_IsBarterSelected,@string,-#_value"

Sorts the barter menu alphabetically, and then by item condition, with all items selected for barter before all other items.

Notes

  • pathName gives the name of the list box to sort, using the same syntax as GetUIFloat.
  • sortSpec defines how the list box items should be sorted. A sort specification looks like
"keySpec0[,keySpec1[,...]][$destinationPath[$incrementPath]]"

where [] indicate optional parts.

  • A keySpec looks like
"[-][#][@]path"

where

 "-" reverses the normal sort order for this key
 "#" sorts this string field numerically (default is alphabetic sort)
 "@" sorts this item name disregarding quanties and mod indicators
   E.g. "9mm Pistol (2)" and "9mm Pistol+" sort as "9mm Pistol"
  • destinationPath describes which trait to modify. The default is _y.
  • incrementPath describes what value to increment destinationPath by. The default is height.

See Also