Summary

Methods

Shows the model panel and fades it in, playing the click sound.
Fades the model panel out and hides it, playing the rollover sound.
Returns the model panel's alpha, taken from its model color.
Init()client
Sets up the model panel (cw.characterModel): hides the cursor, adds a markup tooltip and wraps SetModel to pick an idle animation.
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.
Sets the markup tooltip shown when hovering the model.
Bonemerges a weapon model onto the displayed model, or removes it.
Think()client
Runs the fade animation and keeps the panel at 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 nil Called once the panel is fully visible

Returns

  • Boolean true when the fade started, otherwise nil

PANEL:FadeOut(speed, Callback)

client gamemodes/catwork/gamemode/core/derma/cl_character.lua:1139

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 nil Called once the panel is hidden

Returns

  • Boolean true when the fade started, otherwise nil

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:1250

Bonemerges 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 false to remove the current weapon

Runs the fade animation and keeps the panel at forceX when it is set.

Defined in