Defines cwSpawnIcon, a SpawnIcon that draws a colored border set with SetColor and a fading cooldown overlay set with SetCooldown.

Summary

Methods

Init()client
Draws the cooldown overlay and the colored border over the icon.
Sets the color of the border drawn over the icon.
Shows a cooldown overlay on the icon that fades out until the given time.

Methods

Draws the cooldown overlay and the colored border over the icon.

Sets the color of the border drawn over the icon.

Parameters

  • color Color Border color, or nil to draw no border

PANEL:SetCooldown(expireTime, textureID)

client gamemodes/catwork/gamemode/core/derma/cl_spawnicon.lua:59

Shows a cooldown overlay on the icon that fades out until the given time.

Parameters

  • expireTime Number CurTime at which the cooldown ends
  • textureID Number optional, defaults to nil Texture ID of the overlay; defaults to vgui/white

Defined in