Closed LegendaryGuard closed 1 month ago
I feel like it would be better to be in sync with the other color customization instead of the 0-7 codes.
The position of the slider is wrong, maybe caused by what ensiform said (color codes sync).
It works as it should, that's how it is. If the value is out from 2 - 8, the slider will set to white if you go in UI; after if you didn't change the value in UI and went in-game, your value remains unchanged (set to cvar value).
The slider is like Player effects one.
... ah, okay, but somehow it looks strange if the color of the slider doesn't match the color of the colorbar, I can't see this on player effect (colorbar/slider). Wouldn't it make more sense, if both represents the same color, not only the slider? This is how it is done with the player effect setting. For example, if the color of the crosshair should be cyan and the slider changes its color to cyan, the position of the slider should be at the cyan position as well (and not at the blue position).
Gotta close the PR. I don't know what it could happen if it were merged (breaking incompatibility with Q3A, maybe?). I guess that isn't going anywhere. That was a demonstration of how the ancient mods used this feature before RGBA.
There's other PR opened from other guy who did another version using the code from here: https://github.com/ec-/baseq3a/pull/35
I made the code from scratch. It's the crosshair color feature of the year 2002 and its true source was never shown. This classic feature has appeared in an old mod called Bid For Power.
You can find a table of colors and how works interacting the cgame and UI in the code: https://github.com/ec-/baseq3a/pull/28/files#diff-ef6b3d31ba308d431f88f4e4fd60e7a1899fb15d850a3f4eb74e227b7f783ec8R78
How it works?
In the official Quake 3 gfx.shader, the crosshair is "broken". What that does is making the crosshair unable to be interacted with the colors. So,
cg_crosshairHealth
has never done nothing since this official shader has been staying there.The modified gfx.shader is added in the repository and in pk3 package and the crosshair color can be interacted without problems.
If you've your own gfx.shader or your own shader, what you can do: You need to remove in gfx.shader the following lines that impede colorizing the crosshair:
Click to toggle the removed contents of gfx.shader
``` gfx/2d/crosshair { nopicmip { map gfx/2d/crosshair.tga blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA rgbGen identity } } gfx/2d/crosshairb { nopicmip { map gfx/2d/crosshairb.tga blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA rgbGen identity } } gfx/2d/crosshairc { nopicmip { map gfx/2d/crosshairc.tga blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA rgbGen identity } } gfx/2d/crosshaird { nopicmip { map gfx/2d/crosshaird.tga blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA rgbGen identity } } gfx/2d/crosshaire { nopicmip { map gfx/2d/crosshaire.tga blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA rgbGen identity } } gfx/2d/crosshairf { nopicmip { map gfx/2d/crosshairf.tga blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA rgbGen identity } } gfx/2d/crosshairg { nopicmip { map gfx/2d/crosshairg.tga blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA rgbGen identity } } gfx/2d/crosshairh { nopicmip { map gfx/2d/crosshairh.tga blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA rgbGen identity } } gfx/2d/crosshairi { nopicmip { map gfx/2d/crosshairi.tga blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA rgbGen identity } } gfx/2d/crosshairj { nopicmip { map gfx/2d/crosshairj.tga blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA rgbGen identity } } gfx/2d/crosshairk { nopicmip { map gfx/2d/crosshairk.tga blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA rgbGen identity } } ```Keep in mind,
cg_crosshairHealth
must be disabled (0
). Just set 2, 3, ..., 6, 7 or 8 the color you want to set for the crosshair.2: BLUE
3: GREEN
4: TEAL (CYAN)
5: RED
6: MAGENTA
7: YELLOW
8: WHITE
1: BLACK (That's special, in UI menu won't show and only shows as white - that isn't a bug, it's a feature and works exactly this way as worked in the mods from 99s and 2000s).
How it is in the interactive UI and how it is in-game