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
Change text color
Moderators: winston, another_commander
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Change text color
You can change the colour of some of these elements:
For "Weapons offline":
The comms and msg log colours appear to be hard-coded, though.
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
},
- gsagostinho
- ---- E L I T E ----
- Posts: 573
- Joined: Sun Jul 19, 2015 1:09 pm
Re: Change text color
@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.
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
Re: Change text color
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 in hud.plist, for the sections regarding the weapons and fps counter texts.
Edit: Done. Example screenie:
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
Edit: Done. Example screenie:
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Change text color
Well, that serves me right for not testing something before posting!gsagostinho wrote:the code above does nothing to me, the weapons' text is still always green
- gsagostinho
- ---- E L I T E ----
- Posts: 573
- Joined: Sun Jul 19, 2015 1:09 pm
Re: Change text color
@another_commander Many, many thanks!
@phkb Not a problem at all
@phkb Not a problem at all
- gsagostinho
- ---- E L I T E ----
- Posts: 573
- Joined: Sun Jul 19, 2015 1:09 pm
Re: Change text color
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!