Skip to main content

Crosshair

Represents the shape and color of a crosshair. All crosshair types use this class to store their crosshair properties.

Properties

PropertyTypeDescription
sizeintThe length (in pixels) of each crosshair line. This is only relevant for line crosshairs.
thicknessintThe width (in pixels) of the crosshair lines.
gapintThe distance (in pixels) from the center of the crosshair to the beginning of the crosshair line/s.
spreadfloatAn additional gap to apply to the crosshair. This is useful if you want to apply a temporary additional gap and still want to return to the original gap value.
rotationfloatThe rotation of the crosshair reticle.
colorColorThe color of the crosshair.
reticleSidesToDrawReticleSideWhich sides of the crosshair reticle to draw.
SizeNeededintThe minimum size (in pixels) that the crosshair texture needs to be. This is equal to whichever value is largest out of (gap + size + spread) * 2 or thickness.
CircleSizeNeededintThe minimum size (in pixels) required to draw circle crosshairs. This is equal to (gap + spread + thickness) * 2.
GapPlusSpreadintEqual to gap + spread. This is a useful way to get the full distance from the center of the crosshair to the beginning of the crosshair line/s.