Page 1 of 1

Change text color

Posted: Sun Jul 02, 2017 5:34 pm
by gsagostinho
Hi all,

I started tweaking the current HUD but I can't find out how do I change the color of certain text messages, such as the "weapons offline" (always green), or the communication or messages log (always yellow). Is it possible to tweak those or are these color values hard coded? And if the latter, is there any plans to support this in the next releases?

Cheers!
Gilberto

Re: Change text color

Posted: Sun Jul 02, 2017 10:08 pm
by phkb
You can change the colour of some of these elements:
For "Weapons offline":

Code: Select all

		{// WEAPONS SYSTEM ONLINE STATUS
			selector ="drawWeaponsOfflineText:";
			alert_conditions = 14;
			height = 11.0;
			width = 11.0;
			x = 5.0;
			y = 2.0;
			y_origin = -1;
			x_origin = -1;
			color = "0 0.58 1.0 1"; // this line will adjust the color
		},
The comms and msg log colours appear to be hard-coded, though.

Re: Change text color

Posted: Sun Jul 02, 2017 11:49 pm
by gsagostinho
@phkb thank you so much for the reply, but unfortunately the code above does nothing to me, the weapons' text is still always green. And that is also the case when I used an unaltered version of the Xenon HUD, even though your code does try to override the colour of that text it was also always green. I think I will drop a feature request to the devs at the GitHub page, perhaps it wouldn't be too much trouble making all these text colours changeable.

Re: Change text color

Posted: Mon Jul 03, 2017 12:18 am
by another_commander
Weapons offline text, as well as some other stuff (FPS counter, messages etc) are all hardcoded.

I will commit the color selection functionality for the first two shortly. Messages will be a bit trickier though. Check out the next nightly. To make it work, you will have to add the line

Code: Select all

rgb_color = "orangeColor"; // or whatever color definition you prefer
in hud.plist, for the sections regarding the weapons and fps counter texts.

Edit: Done. Example screenie:
Image

Re: Change text color

Posted: Mon Jul 03, 2017 3:40 am
by phkb
gsagostinho wrote:
the code above does nothing to me, the weapons' text is still always green
Well, that serves me right for not testing something before posting! :oops:

Re: Change text color

Posted: Mon Jul 03, 2017 8:33 am
by gsagostinho
@another_commander Many, many thanks!
@phkb Not a problem at all :D

Re: Change text color

Posted: Mon Jul 17, 2017 11:04 pm
by gsagostinho
In case someone comes across this in the future: as of the current version 1.85 from git, it is possible to change the colours of the weapons offline and FPS texts, the message text colour, as well as the target reticle colour. Thanks another_commander for implementing all these!