Defines the cw.characterMenu panel of the Left-Side Menu plugin, a replacement for the framework's main character menu with its buttons stacked on the left side of the screen.

It registers under the same name as the core panel, so it overrides it. The panel holds the schema title and logo, the new, load, community, forum and leave buttons, the previous, cancel and next navigation of character creation with a progress bar of the creation steps, and the cw.characterModel preview; OpenPanel swaps the active sub-panel such as cw.characterList. The community and forum buttons are driven by the community_* and forum_* config keys, and most steps can be overridden by theme hooks like PreCharacterMenuInit.

Summary

Methods

Moves the character model preview next to the active panel and fades it in with a model.
Fades in the previous, cancel and next buttons, unless the theme's PreCharacterFadeInNavigation returns true.
Fades in the title, credits and main menu buttons, unless the theme's PreCharacterFadeInTitle returns true.
Fades out the character model preview.
Fades out the previous, cancel and next buttons, unless the theme's PreCharacterFadeOutNavigation returns true.
Fades out the title, credits and main menu buttons, unless the theme's PreCharacterFadeOutTitle returns true.
Init()client
Builds the main menu with its title, buttons and character model preview.
Opens a panel inside the character menu, replacing the active one.
Draws the schema logo, the header bar and, during character creation, the progress bar with each step's name.
Closes the active panel and returns to the title screen.
Sets the model shown in the character model preview.
Think()client
Updates the menu every frame: background blur, button visibility, disabled states and labels.

Methods

Moves the character model preview next to the active panel and fades it in with a model.

Does nothing on screens shorter than 768 pixels.

Parameters

  • model String Model path to show

Returns

  • Boolean true when the screen is too small or the fade started, false if the preview was already visible or fading

Fades in the previous, cancel and next buttons, unless the theme's PreCharacterFadeInNavigation returns true.

Fades in the title, credits and main menu buttons, unless the theme's PreCharacterFadeInTitle returns true.

Fades out the character model preview.

Fades out the previous, cancel and next buttons, unless the theme's PreCharacterFadeOutNavigation returns true.

Fades out the title, credits and main menu buttons, unless the theme's PreCharacterFadeOutTitle returns true.

Builds the main menu with its title, buttons and character model preview.

Creates the schema title and credits, the community, new, load, forum and leave buttons, the creation navigation buttons and the model preview. Skipped when the theme's PreCharacterMenuInit returns true; calls PostCharacterMenuInit after.

PANEL:OpenPanel(vguiName, childData, Callback)

client gamemodes/cwhl2rp/plugins/creationmenu/plugin/derma/cl_character.lua:386

Opens a panel inside the character menu, replacing the active one.

The previous active panel fades out and is removed first; otherwise the title fades out. The new panel becomes cw.character.activePanel. Passing childData marks it as part of the creation process and shows the navigation buttons. Skipped when the theme's PreCharacterMenuOpenPanel returns true.

self: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 Creation step data; stored as self.childData
  • Callback Function optional, defaults to nil Called with the new panel once it has been created

Draws the schema logo, the header bar and, during character creation, the progress bar with each step's name.

Parameters

  • w
  • h

Returns

  • Boolean Always true, so Derma skips its default painting

Closes the active panel and returns to the title screen.

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

Sets the model shown in the character model preview.

Also applies the weapon model from the GetModelSelectWeaponModel hook and the sequence from the GetModelSelectSequence hook, when they return one.

Parameters

  • model String Model path to show

Updates the menu every frame: background blur, button visibility, disabled states and labels.

Buttons follow the community_button_enable and forum_button_enable configs, and the new and load buttons are disabled when the character limit is reached or characters are loading.

Defined in