0000105: A_SetCrosshairColor

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

Accensus
Posts: 2383
Joined: Thu Feb 11, 2016 9:59 am

A_SetCrosshairColor

Post by Accensus »

This should help modders who want to match the crosshair color to the weapon color theme.
Example: D4D's BFG is green. The crosshair would match well if it was green, too. Being able to set the color directly through DECORATE/ACS would be a nice feature to have.

The only issue I stumbled across when I thought of the idea was: "What if somebody wanted to force a specific color?"
I reckon the answer to that would be a Force Crosshair Color on/off switch in the HUD menu.

Is something like this doable?
User avatar
NeuralStunner
 
 
Posts: 12325
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: A_SetCrosshairColor

Post by NeuralStunner »

Sounds reasonable (and useful, of course) to me!

What comes to mind most readily:
  • Make the crosshairs for your mod match the scheme of your HUD.
  • Through proper application of linetarget checking, you could change the color based on what you're aiming at. (Allies, enemies, objects of interest, etc.)
  • If you felt like giving your mod insane levels of customizability, you could also set up custom cvars for UT2-style per-weapon crosshair selection.
User avatar
Shadow Hog
Posts: 173
Joined: Fri Aug 14, 2015 8:56 pm

Re: A_SetCrosshairColor

Post by Shadow Hog »

How would this play with the "crosshair reflects player health" option, out of curiosity? Which gets priority?
Accensus
Posts: 2383
Joined: Thu Feb 11, 2016 9:59 am

Re: A_SetCrosshairColor

Post by Accensus »

Crosshair reflects player health, of course.
Accensus
Posts: 2383
Joined: Thu Feb 11, 2016 9:59 am

Re: A_SetCrosshairColor

Post by Accensus »

Is/will this (be) possible with ZScript?
Accensus
Posts: 2383
Joined: Thu Feb 11, 2016 9:59 am

0000105: A_SetCrosshairColor

Post by Accensus »

https://mantis.zdoom.org/view.php?id=105

Code: Select all

Summary	0000105: A_SetCrosshairColor
Description	This is in the Feature Suggestions forum, but since we've moved on to Mantis, I'll also suggest it here. Feel free to close the thread there: https://forum.zdoom.org/viewtopic.php?f=15&t=54005

Crosspost from thread:

"This should help modders who want to match the crosshair color to the weapon color theme.
Example: D4D's BFG is green. The crosshair would match well if it was green, too. Being able to set the color directly through DECORATE/ACS would be a nice feature to have."
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: 0000105: A_SetCrosshairColor

Post by Major Cooke »

DrawImage just needs to have its color settings exposed, or another function made I think...
User avatar
nazakomu
Posts: 131
Joined: Wed Nov 30, 2016 12:51 am
Graphics Processor: nVidia with Vulkan support

Re: 0000105: A_SetCrosshairColor

Post by nazakomu »

Major Cooke wrote:DrawImage just needs to have its color settings exposed, or another function made I think...
I second this, the latter sounds more plausible since there can be more room for flexibility in color(s). I had (and still have) some issues in my own situation when it comes to tinkering around with the colors for DrawImage..
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: 0000105: A_SetCrosshairColor

Post by Major Cooke »

Doesn't look like it'll be too difficult to work with so I'll try coming up with something.
User avatar
nazakomu
Posts: 131
Joined: Wed Nov 30, 2016 12:51 am
Graphics Processor: nVidia with Vulkan support

Re: 0000105: A_SetCrosshairColor

Post by nazakomu »

Major Cooke wrote:Doesn't look like it'll be too difficult to work with
Yeah, you could create something similar to how A_OverlayFlags (and et al.) pairs with A_Overlay.

So the new function can be a color setup of some sort for DrawImage that is separated like the above.

Good luck on the endeavor — I will enjoy this for sure. :mrgreen:
Post Reply

Return to “Feature Suggestions [GZDoom]”