HUD location of message_gui

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4814
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

HUD location of message_gui

Post by phkb »

I'm trying to make my HUD a bit flexible, so I want to have the message_gui in one place when docked, and in another when in space. "Easy," I thought, just use alert_conditions and your away. Here's my code:

Code: Select all

message_gui =
	{
		width 		= 160;
		height 		= 80;
		x		= -242;
		y 		= -180;
		y_origin	= 0;
		row_height 	= 11;
		alert_conditions = 1; // docked
	};

message_gui =
	{
		width 		= 160;
		height 		= 80;
		x		= -242;
		y 		= -48;
		y_origin	= 0;
		row_height 	= 11;
		alert_conditions = 14; // all other conditions
	};
Except it doesn't work. The message_gui seems to only accept the last entry. The first entry is ignored.

Am I doing something wrong? Or is message_gui designed to only be in one place.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: HUD location of message_gui

Post by cim »

phkb wrote:
Or is message_gui designed to only be in one place.
This. It's a top-level key, so you can't have more than one of them in the file.
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: HUD location of message_gui

Post by Smivs »

I'm afraid message_gui is not currently open to 'alert_condition'. I did request this feature some time ago. Still got my fingers crossed :)

Edited to add:- <Sees cims post - uncrosses fingers :( >
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: HUD location of message_gui

Post by Norby »

There are a solution in NumericHUD with two plists changed by js in willDock and willLaunch event handlers.
Post Reply