The attribute list (fl_attributes): a scrollable list with a header for every category
of attributes and every key stat of skills, and an fl_attribute_row for every attribute
and skill that is visible to the player.
By default it shows the attributes and skills of the local player and keeps them current
while it is open; after set_snapshot it shows the data it was given instead, hidden
attributes and skills included. rebuild recreates the list. Derives from
fl_base_panel.
Summary
Methods
Methods
Returns the data the list shows for an attribute.
Parameters
- attribute_id String
Returns
- Map level and boosts; nil if there is no data
Returns the listed attributes and skills as one string, which changes whenever an attribute or a skill appears in the list, disappears from it or moves, or the row of an attribute gains or loses its line of details.
Parameters
- sections List<Map> sections returned by get_sections
Returns
- String
Returns the rank the list shows for a skill.
Parameters
- skill_id String
Returns
- Number rank, 0 if there is none
Collects the attributes and skills to list, grouped into sections. The sections of the attributes come first, one for every category, sorted by name; then the sections of the skills, one for every key stat, in the alphabetical order of the stat names; skills whose key stat is not registered come last, under a section of their own. The entries of a section are sorted by name.
Returns
- List<Map> sections: name (String header text), attributes (List<AttributeBase>) and skills (List<SkillBase>)
Returns the player whose attributes and skills the list shows.
Returns
- Player the player of the snapshot, otherwise the local player
Creates the scroll panel that holds the list.
Draws the card and the title of the list, unless the active theme's PaintAttributesMenu method does it. A list that shows a snapshot draws nothing, as it sits inside a frame.
Parameters
- w Number panel width
- h Number panel height
Keeps the list inside the padding of the panel.
Parameters
- w Number panel width
- h Number panel height
Recreates the list: a header for every section followed by the rows of its attributes and skills, or a notice if there is nothing to show.
PANEL:set_snapshot(target, attributes, skills)
client plugins/stats/plugin/views/cl_attributes.lua:171Makes the list show the given attribute data and skill ranks of a player instead of the
live attributes and skills of the local player. Hidden attributes and skills are listed
too. Call rebuild afterwards.
Parameters
- target Player player the data belongs to
- attributes Map attribute data keyed by attribute ID, as
Player:get_attributesreturns it - skills Map optional, defaults to
nilNumber ranks keyed by skill ID, asPlayer:get_skillsreturns it
Brings the list up to date twice a second.
Brings the list up to date with the data it shows: rebuilds it if the set of listed attributes and skills has changed, otherwise passes every attribute row its current data and every skill row its current rank.