Summary

Methods

Moves the model preview next to the active panel, fades it in and shows a model in it.
Fades in the Previous, Cancel and Next buttons unless the theme's PreCharacterFadeInNavigation hook returns true.
Fades in the schema title, description and credits unless the theme's PreCharacterFadeInTitle hook returns true.
Fades out the model preview.
Fades out the Previous, Cancel and Next buttons unless the theme's PreCharacterFadeOutNavigation hook returns true.
Fades out the schema title, description and credits unless the theme's PreCharacterFadeOutTitle hook returns true.
Init()client
Builds the full-screen character menu: schema title or logo, credits, the New, Load and Leave buttons, the creation navigation buttons and the model preview.
Replaces the active panel of the character menu with a new panel.
Draws the schema logo, the top bar and, during character creation, the step progress bar.
Fades out and removes the active panel, then brings back the title, and hides the model preview and navigation.
Sets the model shown in the model preview and applies the weapon model and sequence from hooks.
Think()client
Updates the background blur and enables or disables the menu buttons each frame.

Methods

PANEL:FadeInModelPanel(model)

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

Moves the model preview next to the active panel, fades it in and shows a model in it.

Does nothing on screens shorter than 768 pixels.

Parameters

  • model String Model to show once the preview is fading in

Returns

  • Boolean true when the screen is too small or the fade started, false otherwise

Fades in the Previous, Cancel and Next buttons unless the theme's PreCharacterFadeInNavigation hook returns true.

Fades in the schema title, description and credits unless the theme's PreCharacterFadeInTitle hook returns true.

Fades out the model preview.

Fades out the Previous, Cancel and Next buttons unless the theme's PreCharacterFadeOutNavigation hook returns true.

Fades out the schema title, description and credits unless the theme's PreCharacterFadeOutTitle hook returns true.

Builds the full-screen character menu: schema title or logo, credits, the New, Load and Leave buttons, the creation navigation buttons and the model preview.

Skipped when the theme's PreCharacterMenuInit hook returns true; PostCharacterMenuInit runs afterwards.

PANEL:OpenPanel(vguiName, childData, Callback)

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

Replaces the active panel of the character menu with a new panel.

The current active panel fades out and is removed first; with no active panel the title fades out instead. The new panel becomes cw.character.activePanel, fades in and gets popup focus. When childData is given the panel is marked as part of the creation process and the navigation buttons fade in. Skipped when the theme's PreCharacterMenuOpenPanel hook returns true; PostCharacterMenuOpenPanel runs afterwards.

cw.character:GetPanel():OpenPanel('cw.characterList', nil, function(panel)
  cw.character:RefreshPanelList()
end)

Parameters

  • vguiName String Registered name of the panel to create
  • childData Any optional, defaults to nil Data stored as self.childData for the new panel to read; marks a creation step
  • Callback Function optional, defaults to nil Called with the new panel once it has been created

Draws the schema logo, the top bar and, during character creation, the step progress bar.

Skipped when the theme's PreCharacterMenuPaint hook returns true; PostCharacterMenuPaint runs afterwards.

Parameters

  • w
  • h

Fades out and removes the active panel, then brings back the title, and hides the model preview and navigation.

PANEL:SetModelPanelModel(model)

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

Sets the model shown in the model preview and applies the weapon model and sequence from hooks.

The weapon model comes from the GetModelSelectWeaponModel hook and the animation from the GetModelSelectSequence hook.

Parameters

  • model String Model path to show

Updates the background blur and enables or disables the menu buttons each frame.

Skipped when the theme's PreCharacterMenuThink hook returns true; PostCharacterMenuThink runs afterwards.

Defined in