Nuclide
Software Development Kit for id Tech
|
Crosshair helper functions. More...
Functions | |
void | Cross_Draw (string materialPath, vector sizeXY) |
Draws a crosshair on the screen with the desired material and size. More... | |
void | Cross_DrawRGB (string materialPath, vector sizeXY, vector colorRGB) |
Draw a given crosshair on the screen, with variable color. More... | |
void | Cross_DrawRGBA (string materialPath, vector sizeXY, vector colorRGB, float alphaValue) |
Draw a given crosshair on the screen, with variable color and alpha. More... | |
void | Cross_DrawSub (string materialPath, vector sizeXY, vector sourcePosXY, vector sourceSizeXY) |
Draw a given crosshair on the screen, of only a section from a material. More... | |
void | Cross_DrawSubRGB (string materialPath, vector sizeXY, vector sourcePosXY, vector sourceSizeXY, vector colorRGB) |
Draw a given crosshair on the screen, of only a section from a material, with variable color. More... | |
void | Cross_DrawSubRGBA (string materialPath, vector sizeXY, vector sourcePosXY, vector sourceSizeXY, vector colorRGB, float alphaValue) |
Draw a given crosshair on the screen, of only a section from a material, with variable color/alpha. More... | |
Crosshair helper functions.
Helper functions for dealing with crosshairs in games. If you don't want to deal with handling accurate crosshairs in a variety of view modes (1st-person, 3rd-person, XR) then simply use one of the supplied functions.
Draws a crosshair on the screen with the desired material and size.
materialPath | is the material to use. |
sizeXY | is the size in pixels it is meant to take up on screen. |
Draw a given crosshair on the screen, with variable color.
materialPath | is the material to use. |
sizeXY | is the size in pixels it is meant to take up on screen. |
colorRGB | is the normalized color values to tint the surface with. |
Draw a given crosshair on the screen, with variable color and alpha.
materialPath | is the material to use. |
sizeXY | is the size in pixels it is meant to take up on screen. |
colorRGB | is the normalized color values to tint the surface with. |
alphaValue | is the alpha values to use on the whole surface. |
Draw a given crosshair on the screen, of only a section from a material.
materialPath | is the material to use. |
sizeXY | is the size in pixels it is meant to take up on screen. |
sourcePosXY | is a normalized starting position within the material from which we should start drawing from. |
sourceSizeXY | is the normalized size within the material from which we should draw from. |
void Cross_DrawSubRGB | ( | string | materialPath, |
vector | sizeXY, | ||
vector | sourcePosXY, | ||
vector | sourceSizeXY, | ||
vector | colorRGB | ||
) |
Draw a given crosshair on the screen, of only a section from a material, with variable color.
materialPath | is the material to use. |
sizeXY | is the size in pixels it is meant to take up on screen. |
sourcePosXY | is a normalized starting position within the material from which we should start drawing from. |
sourceSizeXY | is the normalized size within the material from which we should draw from. |
colorRGB | is the normalized color values to tint the surface with. |
void Cross_DrawSubRGBA | ( | string | materialPath, |
vector | sizeXY, | ||
vector | sourcePosXY, | ||
vector | sourceSizeXY, | ||
vector | colorRGB, | ||
float | alphaValue | ||
) |
Draw a given crosshair on the screen, of only a section from a material, with variable color/alpha.
materialPath | is the material to use. |
sizeXY | is the size in pixels it is meant to take up on screen. |
sourcePosXY | is a normalized starting position within the material from which we should start drawing from. |
sourceSizeXY | is the normalized size within the material from which we should draw from. |
colorRGB | is the normalized color values to tint the surface with. |
alphaValue | is the alpha values to use on the whole surface. |