[Release] HUD Selector v1.17
Posted: Fri Jul 04, 2014 11:34 pm
HUD Selector should solve the problem of multiple installed HUDs discussed here.
Useful also to save your MFD setup.
You can switch around the supported ones during flight by priming and activating the HUD Selector equipment (try it):
* Default HUD (the actual hud.plist, for example AAD HUD or Compact HUD)
* ExtraLarge HUD with 10 MFDs and custom dials
* Large HUD with 10 MFDs and custom dials
* Numeric HUD (an example of handling scripted HUDs)
* Small HUD with 10 MFDs and custom dials
You can set your scanner to NonLinear and UltraZoom by pressing mode key (b) as many times as needed when HUD Selector primed. Your settings are stored in your savegame.
In the Interfaces (F4) screen you can select from the installed HUDs and set the default of your MFDs.
From Oolite v1.81 the in-flight MFD changes are saved and custom dials from CombatMFD are used.
ExtraLarge HUD with 8 MFDs and custom dials on 4:3 screen (10 MFD need 16:9 or 16:10 screen):
Large HUD with 10 MFDs, custom dials like speed value and a large alert sensitive scanner:
Small HUD with 10 MFDs:
Other HUDs can join by the following steps:
* must be the plist differently named than hud.plist
* must define a worldScript (for example in Config/script.js) with similar this.name than the plist
* set your HUD in startUp and add your HUD and plist name into HUDSelector:* if your HUD define different plists for 4:3, 16:10 and 16:9 screens named to "yourhud.plist", "yourhud10.plist" and "yourhud9.plist" then give all of them to AddHUD:
HUDSelector will set the proper plist for the current screen but will not follow the window resizes, for example if you switch to fullscreen during flight. In this case you can set your HUD again by activating the HUDSelector equipment.
* You can define a callback function in your worldScript to start/stop some parts of your scripted HUD:
There are a built-in support for some existing Multi-Function Display (MFD) OXPs, these will be set as default MFDs.
New MFDs can register in startUp:
If the name of the MFD defined in setMultiFunctionText() call is different from the worldscript name then must give the name in the second parameter:
Useful also to save your MFD setup.
You can switch around the supported ones during flight by priming and activating the HUD Selector equipment (try it):
* Default HUD (the actual hud.plist, for example AAD HUD or Compact HUD)
* ExtraLarge HUD with 10 MFDs and custom dials
* Large HUD with 10 MFDs and custom dials
* Numeric HUD (an example of handling scripted HUDs)
* Small HUD with 10 MFDs and custom dials
You can set your scanner to NonLinear and UltraZoom by pressing mode key (b) as many times as needed when HUD Selector primed. Your settings are stored in your savegame.
In the Interfaces (F4) screen you can select from the installed HUDs and set the default of your MFDs.
From Oolite v1.81 the in-flight MFD changes are saved and custom dials from CombatMFD are used.
ExtraLarge HUD with 8 MFDs and custom dials on 4:3 screen (10 MFD need 16:9 or 16:10 screen):
Large HUD with 10 MFDs, custom dials like speed value and a large alert sensitive scanner:
Small HUD with 10 MFDs:
Other HUDs can join by the following steps:
* must be the plist differently named than hud.plist
* must define a worldScript (for example in Config/script.js) with similar this.name than the plist
* set your HUD in startUp and add your HUD and plist name into HUDSelector:
Code: Select all
this.name = "yourhud";
this.startUp = function () {
player.ship.hud = this.name + ".plist";
var w = worldScripts.hudselector;
if( w ) w.$HUDSelectorAddHUD("Your HUD", this.name);
}
Code: Select all
if( h ) h.$HUDSelectorAddHUD("Your HUD", this.name, this.name+"10", this.name+"9" );
* You can define a callback function in your worldScript to start/stop some parts of your scripted HUD:
Code: Select all
this.$HUDSelectorCallBack = function ( off ) {
var w = worldScripts["yourhud"];
if( off ) { //do things to disable your HUD like rename functions
if( w.shipWillLaunchFromStation ) {
w.$save_shipWillLaunchFromStation = w.shipWillLaunchFromStation;
delete w.shipWillLaunchFromStation;
}
} else { //do things to activate your HUD like restore disabled functions
if( !w.shipWillLaunchFromStation )
eval("w.shipWillLaunchFromStation = "+w.$save_shipWillLaunchFromStation);
}
}
New MFDs can register in startUp:
Code: Select all
var h = worldScripts.hudselector;
if( h && h.$HUDSelectorAddMFD ) h.$HUDSelectorAddMFD(this.name);
Code: Select all
var h = worldScripts.hudselector;
if( h && h.$HUDSelectorAddMFD ) h.$HUDSelectorAddMFD(this.name, "nameOfTheMFD");