Download "HUDs, Data - Ship Name" I've just added to the OXZ manager. Ignore the description there.
Open your hud.plist file and add this to the dials array:-
Code: Select all
{
data_source = "playerShipName"; // Ship's name.
selector = "drawCustomText:";
alert_conditions = 2; // Green alert only
color = "greenColor";
alpha = 0.5;
x = 32; y = -40; y_origin = 1; x_origin = -1; height = 20; width = 12;
},
{
data_source = "playerShipClass"; // Ship's type.
selector = "drawCustomText:";
alert_conditions = 2; // Green alert only
color = "greenColor";
alpha = 0.5;
x = 32; y = -44; y_origin = 1; x_origin = -1; height = 8; width = 8;
},
Unlike in the bad old days, you'll never need to edit hud.plist again if you change your ship's name or use more than one save-game. It'll automatically find the correct name.
If you want to use this in a HUD OXP you publish, just add this to your manifest file:-
Code: Select all
"requires_oxps" = (
{
"identifier" = "oolite.hud.data.Wildeblood.ShipName";
"description" = "Data - Ship Name (for playerShipName & playerShipClass data sources)";
}
);
R.I.P. Edward Gough Whitlam, 1916-2014.