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
PreCharacterFadeInNavigation returns true.PreCharacterFadeInTitle returns true.PreCharacterFadeOutNavigation returns true.PreCharacterFadeOutTitle returns true.Methods
PANEL:FadeInModelPanel(model)
client gamemodes/cwhl2rp/plugins/creationmenu/plugin/derma/cl_character.lua:240Moves 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
truewhen the screen is too small or the fade started,falseif the preview was already visible or fading
Fades in the title, credits and main menu buttons, unless the theme's PreCharacterFadeInTitle returns true.
PANEL:FadeOutModelPanel()
client gamemodes/cwhl2rp/plugins/creationmenu/plugin/derma/cl_character.lua:263Fades out the character model preview.
PANEL:FadeOutTitle()
client gamemodes/cwhl2rp/plugins/creationmenu/plugin/derma/cl_character.lua:337Fades 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:386Opens 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
nilCreation step data; stored asself.childData - Callback Function optional, defaults to
nilCalled 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
PANEL:ReturnToMainMenu()
client gamemodes/cwhl2rp/plugins/creationmenu/plugin/derma/cl_character.lua:301Closes 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.
PANEL:SetModelPanelModel(model)
client gamemodes/cwhl2rp/plugins/creationmenu/plugin/derma/cl_character.lua:272Sets 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.