Defines cwPanelList, a DCategoryList with an outlined background that docks added items to the top, used as the list in most framework menus.

Keeps DPanelList methods such as SetSpacing and EnableVerticalScrollbar so older code keeps working.

Summary

Methods

Docks an item to the top of the list with the list's padding around it.
Does nothing; kept so code written for DPanelList keeps working.
Stops the list from drawing its background.
Init()client
Sets the list's default dark background and black outline.
Draws the outlined background unless it is hidden.
Sets the list's background and outline colors.
Sets the space left below each item added afterwards.

Methods

PANEL:AddItem(item, bottomMargin)

client gamemodes/catwork/gamemode/core/derma/cl_panellist.lua:39

Docks an item to the top of the list with the list's padding around it.

Parameters

  • item Panel Panel to add
  • bottomMargin Number optional, defaults to nil Space below the item; defaults to the SetSpacing value, or 8

PANEL:EnableVerticalScrollbar()

client gamemodes/catwork/gamemode/core/derma/cl_panellist.lua:34

Does nothing; kept so code written for DPanelList keeps working.

Stops the list from drawing its background.

Sets the list's default dark background and black outline.

Draws the outlined background unless it is hidden.

Parameters

  • width
  • height

PANEL:SetBackgroundColor(color, col2)

client gamemodes/catwork/gamemode/core/derma/cl_panellist.lua:17

Sets the list's background and outline colors.

Parameters

  • color Color Background color
  • col2 Color optional, defaults to nil Outline color; black when not given

Sets the space left below each item added afterwards.

Parameters

  • spacing Number Space in pixels

Defined in