cw.characterAttribute panelclient
Panel defined in core/derma/cl_character.lua
Summary
Methods
AddPoint()client
Adds a point to the attribute when the shared point budget allows it.
GetAttributeID()client
Returns the unique ID of the row's attribute.
GetPointsUsed()client
Returns the points spent on every attribute row in the group.
GetTotalPoints()client
Returns the points given to this attribute.
Init()client
Builds an attribute row for character creation (
cw.characterAttribute) with a points bar and add and remove buttons.RemovePoint()client
Removes a point from the attribute, never going below zero.
Sets the group of attribute rows that share the point budget.
Sets the attribute the row is for.
Sets the point budget shared by the group of attribute rows.
Think()client
Lays out the attribute row and refreshes its tooltip with the attribute's points and description when the points change.
Methods
Adds a point to the attribute when the shared point budget allows it.
Returns the unique ID of the row's attribute.
Returns
- String The attribute's
uniqueID
Returns the points spent on every attribute row in the group.
Returns
- Number Sum of the points of the panels set with
SetAttributePanels
Returns the points given to this attribute.
Returns
- Number Points given to this attribute
Builds an attribute row for character creation (cw.characterAttribute) with a points bar and add
and remove buttons.
Removes a point from the attribute, never going below zero.
PANEL:SetAttributePanels(attributePanels)
client gamemodes/catwork/gamemode/core/derma/cl_character.lua:1506Sets the group of attribute rows that share the point budget.
Parameters
- attributePanels List<Panel> The
cw.characterAttributerows of the creation step
PANEL:SetAttributeTable(attributeTable)
client gamemodes/catwork/gamemode/core/derma/cl_character.lua:1512Sets the attribute the row is for.
Parameters
- attributeTable Attribute The attribute table
PANEL:SetMaximumPoints(maximumPoints)
client gamemodes/catwork/gamemode/core/derma/cl_character.lua:1518Sets the point budget shared by the group of attribute rows.
Parameters
- maximumPoints Number Number of points that can be spent in total
Lays out the attribute row and refreshes its tooltip with the attribute's points and description when the points change.