Source2Toolkit
SchemaEntityClasses

CCSCustomHudLayout

CCSCustomHudLayout

Inheritance: CBaseEntity

Fields

  • m_strLayout CUtlSymbolLarge
  • m_vecPlayerLayoutStates CUtlVector<CCSCustomHudLayoutState>
  • m_globalLayoutState CCSCustomHudLayoutState
  • m_vecPanelIds CUtlVector<CUtlString>
  • m_vecClassNames CUtlVector<CUtlString>
  • m_vecDialogVariableNames CUtlVector<CUtlString>

Methods

CCSCustomHudLayout* Create(pszLayout, pszTargetName)

Creates and spawns a custom_hud_layout for a panorama layout, e.g. "my_panel" for panorama/layout/custom_game/my_panel.vxml_c.

Parameters
  • pszLayout const char*
  • pszTargetName const char*

CCSCustomHudLayoutState& GetLayoutState(pController)

Gets the layout state of one player, or the global state when no controller is given.

Parameters
  • pController CCSPlayerController*

SetHasClass(pszPanelId, pszClassName, bHasClass, pController)

Adds or removes a CSS class on a panel of the layout.

Parameters
  • pszPanelId const char*
  • pszClassName const char*
  • bHasClass bool
  • pController CCSPlayerController*

SetDialogVariableString(pszPanelId, pszVariableName, pszValue, pController)

Sets a dialog variable string on a panel of the layout.

Parameters
  • pszPanelId const char*
  • pszVariableName const char*
  • pszValue const char*
  • pController CCSPlayerController*

SetInputCaptureEnabled(bEnable, pController)

Enables or disables mouse input capture, without which the player cannot click the layout.

Parameters
  • bEnable bool
  • pController CCSPlayerController*

bool IsInputCaptureEnabled(pController)

Whether mouse input capture is enabled.

Parameters
  • pController CCSPlayerController*

HookClick(callback)

Registers a callback fired when a player clicks a panel of this layout, keyed by the panel's id attribute.

Parameters
  • callback std::function<void(CCSPlayerController*, CCSCustomHudLayout*, const char*)>

UnhookClicks()

Drops every click callback registered for this layout.

CCSCustomHudLayout* New(className)

Parameters
  • className const char*

CCSCustomHudLayout* FromIndex(iIndex)

Parameters
  • iIndex int

CCSCustomHudLayout* FromIndex(index)

Parameters
  • index CEntityIndex

CHandle<CCSCustomHudLayout> GetHandle()

On this page