Oolite Bulletins

For information and discussion about Oolite.
It is currently Fri Nov 24, 2017 11:08 am

All times are UTC




Post new topic  Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Change text color
PostPosted: Sun Jul 02, 2017 5:34 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sun Jul 19, 2015 1:09 pm
Posts: 419
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


Top
   
 Post subject: Re: Change text color
PostPosted: Sun Jul 02, 2017 10:08 pm 
Offline
Commodore
Commodore
User avatar

Joined: Tue Jan 21, 2014 10:37 pm
Posts: 1806
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...
You can change the colour of some of these elements:
For "Weapons offline":
Code:
		{// 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.

_________________
My OXP's


Top
   
 Post subject: Re: Change text color
PostPosted: Sun Jul 02, 2017 11:49 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sun Jul 19, 2015 1:09 pm
Posts: 419
@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.


Top
   
 Post subject: Re: Change text color
PostPosted: Mon Jul 03, 2017 12:18 am 
Offline
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral

Joined: Wed Feb 28, 2007 7:54 am
Posts: 5016
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:
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


Top
   
 Post subject: Re: Change text color
PostPosted: Mon Jul 03, 2017 3:40 am 
Offline
Commodore
Commodore
User avatar

Joined: Tue Jan 21, 2014 10:37 pm
Posts: 1806
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...
Quote:
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:

_________________
My OXP's


Top
   
 Post subject: Re: Change text color
PostPosted: Mon Jul 03, 2017 8:33 am 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sun Jul 19, 2015 1:09 pm
Posts: 419
@another_commander Many, many thanks!
@phkb Not a problem at all :D


Top
   
 Post subject: Re: Change text color
PostPosted: Mon Jul 17, 2017 11:04 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sun Jul 19, 2015 1:09 pm
Posts: 419
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!


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 16 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Limited