cw.characterModel panelclient
Panel defined in core/derma/cl_character.lua
Summary
Methods
cw.characterModel): hides the cursor, adds a markup tooltip and wraps SetModel to pick an idle animation.DoClick field, when set, on any mouse press.forceX when it is set.Methods
Shows the model panel and fades it in, playing the click sound.
When the panel is already visible or animating, it is made fully visible at once.
Parameters
- speed Number Length of the fade in seconds
- Callback Function optional, defaults to
nilCalled once the panel is fully visible
Returns
- Boolean
truewhen the fade started, otherwisenil
Fades the model panel out and hides it, playing the rollover sound.
When the panel is already transparent or animating, it is hidden at once.
Parameters
- speed Number Length of the fade in seconds
- Callback Function optional, defaults to
nilCalled once the panel is hidden
Returns
- Boolean
truewhen the fade started, otherwisenil
Returns the model panel's alpha, taken from its model color.
Parameters
- alpha Any Unused
Returns
- Number Alpha from 0 to 255
Sets up the model panel (cw.characterModel): hides the cursor, adds a markup tooltip and wraps
SetModel to pick an idle animation.
The wrapped SetModel plays the model's menu sequence from cw.animation:GetMenuSequence when it has
one, otherwise one of the LineIdle sequences or an idle or walk sequence. The original SetModel is
kept as ClockworkSetModel.
Turns the model's head towards the cursor, faces it at a fixed angle and runs its animation.
Calls the panel's DoClick field, when set, on any mouse press.
Removes the displayed model and its weapon model when the panel is removed.
Sets the model panel's alpha by changing the alpha of its model color.
Parameters
- alpha Number Alpha from 0 to 255
Sets the markup tooltip shown when hovering the model.
Parameters
- details String Markup text of the tooltip
PANEL:SetWeaponModel(weaponModel)
client gamemodes/catwork/gamemode/core/derma/cl_character.lua:1250Bonemerges a weapon model onto the displayed model, or removes it.
Does nothing when the same weapon model is already shown.
Parameters
- weaponModel String Weapon model path, or
falseto remove the current weapon
Runs the fade animation and keeps the panel at forceX when it is set.