Page 1 of 1

HUD

Posted: Thu Jan 15, 2015 9:16 pm
by ralph_hh
with the pitviper oxp came a new HUD.. since I wanted to Play around with the HUD anyway, here I go..

1) I so far fail to make the message log display permanent.
permanent=yes did not work...

Code: Select all

message_gui =
                {
                width 		= 130;
                height 		= 150;
                x		= -232;
                y 		= -60;
				y_origin	= 0;
                row_height 	= 12;
				[b]permanent = YES;[/b]
				automatic = NO;
                };
What else can I try. Since the pitviper hud is displayed, I do not guess that it is overwritten by another OXP.

2) This HUD does not display advanced space compass' Labels such as star, planet, station, space bar. How do I activate those?

Re: HUD

Posted: Thu Jan 15, 2015 9:27 pm
by Venator Dha
comm_log_gui can be permanent, don't think the message_gui can though.

Re: HUD

Posted: Thu Jan 15, 2015 9:35 pm
by cim
ralph_hh wrote:
1) I so far fail to make the message log display permanent.
You can't do that in Oolite at the moment. "permanent" only applies to the comm_log_gui, not the message_gui. Do you want me to look at it as a possible feature for the future next time I have the HUD code open?
ralph_hh wrote:
2) This HUD does not display advanced space compass' Labels such as star, planet, station, space bar. How do I activate those?
You need a drawAscTarget: dial adding to the dials list.

The one from the default HUD is

Code: Select all

		{	// compass beacon/waypoint ID, x and y give the location, the size defines the character size
			equipment_required 	= "EQ_ADVANCED_COMPASS";
			selector		= "drawASCTarget:";
			height		= 12;
			width		= 12;
			x		= 144;
			y		= 4;
			y_origin	= -1;
			align = 1;
		},
You'll need to change the x and y, and perhaps some of the others, to get it into the right place.

If the HUD is old enough not to have that, it's probably also missing the waypoint display dial, which you might need at some point depending on your OXPs

Code: Select all

{	// Waypoint display
			equipment_required 	= "EQ_ADVANCED_COMPASS";
			selector		= "drawWaypoints:";
		},
and the primed equipment display, which isn't essential but is worth considering.

Code: Select all

{	// primed equipment, x and y give the location, the size defines the character size, n_bars is the number of items to show (default 1)
			selector	= "drawPrimedEquipment:";
			y_origin = -1;
			x = 156;
			y = -2;
			width		= 10;
			height		= 10;
		},
which you might also want to consider adding.

It also probably doesn't have any MFD spaces defined (the green text boxes used by various OXPs for additional information). How many MFD spaces you need depends on how many of those OXPs you want to install, and how much blank space you want to leave on your HUD for actually looking at your surroundings. I think two MFDs is plenty, while some people have put ten on at once. To add those you need an entry like this at the top level of the HUD definition (i.e. outside the dials list, alongside the message_gui and comm_log_gui entries)

Code: Select all

multi_function_displays = (
		{
			width = 198;
			height = 132;
			x = -156;
			y = -72;
			y_origin = 1;
		},
		{
			width = 198;
			height = 132;
			x = 156;
			y = -72;
			y_origin = 1;
		}
	);

Re: HUD

Posted: Thu Jan 15, 2015 9:47 pm
by ralph_hh
Uh, whow. Thanks!
I'll have a look one after another sooner or later. :-) Currently i'm in outer space.

I'm not sure with the permanent message_gui. i mean - I can't test it, so no idea, if this is a good idea. For one Thing, I like to see how much bounty I got and the information mostly gets lost in the heat of a lengthy battle. The message log at least can be re-called. If it's no big deal, yes please!

Re: HUD

Posted: Sun Jan 18, 2015 7:43 pm
by Norby
cim wrote:
ralph_hh wrote:
1) I so far fail to make the message log display permanent.
Do you want me to look at it as a possible feature for the future next time I have the HUD code open?
I can imagine an event handler for message logging, in this case phkb's [wiki]CommsLogMFD[/wiki] can show these in another MFD with scrollback function.

Re: HUD

Posted: Mon Jan 19, 2015 10:08 am
by ralph_hh
Ok, I did not have the time to try a lot of these, Bu so far, I tried the "rawASCTarget:" thing. Did not work :-(
To see if I was in the correct HUD and the cache was renewed, I had the text size of the "W" and "N" reduced, that did work.

What are the y_origine, align and alpha values doing? Do I need to bring this a layer higher?

Re: HUD

Posted: Mon Jan 19, 2015 11:34 am
by Smivs
ralph_hh wrote:
What are the y_origine, align and alpha values doing? Do I need to bring this a layer higher?
x and y origin are the position relative to the top and side of the screen.
Align is to left or right-align the text for the ASC target.
Alpha is the degree of transparency.
Full details can be found on the wiki page.