cwAttributesItem panelclient
Panel defined in core/derma/cl_attributes.lua
Summary
Methods
Init()client
Builds an attribute row (
cwAttributesItem) for the parent's currentAttribute, with an animated points bar, a progress bar, a value label and the attribute's icon when it has one.Paint(w, h)client
Draws the attribute row's gradient background.
PerformLayout(w, h)client
Keeps the attribute row's icon in the top left corner.
Updates the row's value label to show the boosted value out of the maximum and keeps it right-aligned.
Think()client
Resizes the attribute row's bars to leave room for the icon when there is one.
Methods
Builds an attribute row (cwAttributesItem) for the parent's currentAttribute, with an animated points bar,
a progress bar, a value label and the attribute's icon when it has one.
Draws the attribute row's gradient background.
Parameters
- w
- h
Keeps the attribute row's icon in the top left corner.
Parameters
- w
- h
PANEL:SetPercentageText(maximum, default, boost)
client gamemodes/catwork/gamemode/core/derma/cl_attributes.lua:314Updates the row's value label to show the boosted value out of the maximum and keeps it right-aligned.
Parameters
- maximum Number Maximum value of the attribute
- default Number Current base value of the attribute
- boost Number Total boost applied to the attribute; negative when hindered
Resizes the attribute row's bars to leave room for the icon when there is one.