Registers the Color Modify system, which lets admins with the a flag tune a screen color modification applied to every player.

The client page has an enable checkbox and sliders for brightness, contrast, color and the add and multiply channels. Changes go to the server over the SystemColSet Cable message, are validated and stored in cw.OverrideColorMod, saved to the color schema data file (which the server loads again when it starts) and broadcast back to all clients.

Summary

Methods

Returns the slider settings for a color modification key.
Returns the current color modification values.
Builds the enable checkbox and one slider per color modification value.

Methods

Returns the slider settings for a color modification key.

Parameters

  • key String One of brightness, contrast, color, addr, addg, addb, mulr, mulg or mulb

Returns

  • Map name (language key), minimum, maximum and decimals for the slider, or nil for an unknown key

Returns the current color modification values.

Returns

  • Map The cw.OverrideColorMod table: enabled plus the brightness, contrast, color and add/mul channels

SYSTEM:OnDisplay(systemPanel, systemForm)

client gamemodes/catwork/gamemode/core/system/sh_color_modify.lua:105

Builds the enable checkbox and one slider per color modification value.

Changes are sent to the server with the SystemColSet Cable message once the mouse button is released.

Parameters

  • systemPanel Panel The system panel to add the form to
  • systemForm Panel The system's form (unused, the system does not create one)

Defined in