Difference between revisions of "HUDSelector"

From Elite Wiki
(Categories added)
(v1.1)
Line 6: Line 6:
 
Initially supported HUDs:
 
Initially supported HUDs:
 
* Default HUD (the actual hud.plist, for example AAD HUD or Compact HUD)
 
* Default HUD (the actual hud.plist, for example AAD HUD or Compact HUD)
* Numeric HUD (from v3.22 with 6 MFDs)
+
* Original HUD (8 MFDs but the bottom two is not well usable in 4:3 screens)
* Original HUD (included with hidden MFDs)
+
* Small HUD (8 MFDs)
* Small HUD (included with hidden MFDs)
+
* Numeric HUD (from v3.22)
  
  
Line 17: Line 17:
 
   this.name = "yourhud";
 
   this.name = "yourhud";
 
   this.startUp = function () {
 
   this.startUp = function () {
  player.ship.hud =  this.name + ".plist";
+
    player.ship.hud =  this.name + ".plist";
  var w = worldScripts.hudselector;
+
    var h = worldScripts.hudselector;
  if( w ) w.$HUDSelectorAddHUD("Your HUD", this.name); //name of plist without extension
+
    if( h ) h.$HUDSelectorAddHUD("Your HUD", this.name); //name of plist without extension
 
   }
 
   }
 
* can define a callback function in your worldScript to start/stop some parts of your scripted HUD:
 
* can define a callback function in your worldScript to start/stop some parts of your scripted HUD:
Line 34: Line 34:
 
     }
 
     }
 
   }
 
   }
 +
 +
 +
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:
 +
  var h = worldScripts.hudselector;
 +
  if( h && h.$HUDSelectorAddMFD ) h.$HUDSelectorAddMFD(this.name);
 +
 +
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:
 +
  var h = worldScripts.hudselector;
 +
  if( h && h.$HUDSelectorAddMFD ) h.$HUDSelectorAddMFD(this.name, "nameOfTheMFD");
 +
 +
 +
In the Interfaces (F4) screen you can select from the installed HUDs and set the default of your MFDs.
 +
Currently only the first 20 HUDs and 24 MFDs are shown.
 +
 +
 +
 +
Original HUD with 8 MFDs:
 +
[[Image:OriginalHUD.png|800px]]
 +
 +
Small HUD with 8 MFDs:
 +
[[Image:SmallHUD.png|800px]]
  
  
Line 48: Line 71:
  
 
'''Download'''
 
'''Download'''
 +
 +
[[Media:HUDSelector_1.1.oxz|HUDSelector 1.1]]  (downloaded {{#downloads:HUDSelector_1.1.oxz}} times).
  
 
[[Media:HUDSelector_1.0.oxz|HUDSelector 1.0]]  (downloaded {{#downloads:HUDSelector_1.0.oxz}} times).
 
[[Media:HUDSelector_1.0.oxz|HUDSelector 1.0]]  (downloaded {{#downloads:HUDSelector_1.0.oxz}} times).
Line 58: Line 83:
  
 
'''Changelog'''
 
'''Changelog'''
 +
2014.08.11. v1.1  Interfaces and MFD handling.
 +
                  Selections are saved into the savegame.
 +
                  The included Original and Small HUDs has 8 MFDs.
 
  2014.07.05. v1.0  First release.
 
  2014.07.05. v1.0  First release.
  
 
[[Category:Oolite expansion packs]]
 
[[Category:Oolite expansion packs]]
 
[[Category:HUDs OXPs‏‎]]
 
[[Category:HUDs OXPs‏‎]]

Revision as of 03:32, 11 August 2014

Install this equipment and change your HUD during flight by pirme (Shift+N) and activate (n).

After you selected your HUD, you can remove HUD Selector equipment due to the selection is saved into your savegame.


Initially supported HUDs:

  • Default HUD (the actual hud.plist, for example AAD HUD or Compact HUD)
  • Original HUD (8 MFDs but the bottom two is not well usable in 4:3 screens)
  • Small HUD (8 MFDs)
  • Numeric HUD (from v3.22)


Requirements from other HUDs:

  • must be the plist differently named than hud.plist
  • must define a worldScript with similar this.name than the plist (for example in Config/script.js)
  • set your HUD and add your HUD name with plist name into HUDSelector in startUp:
 this.name = "yourhud";
 this.startUp = function () {
   player.ship.hud =  this.name + ".plist";
   var h = worldScripts.hudselector;
   if( h ) h.$HUDSelectorAddHUD("Your HUD", this.name); //name of plist without extension
 }
  • can define a callback function in your worldScript to start/stop some parts of your scripted HUD:
 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);
   }
 }


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:

 var h = worldScripts.hudselector;
 if( h && h.$HUDSelectorAddMFD ) h.$HUDSelectorAddMFD(this.name);

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:

 var h = worldScripts.hudselector;
 if( h && h.$HUDSelectorAddMFD ) h.$HUDSelectorAddMFD(this.name, "nameOfTheMFD");


In the Interfaces (F4) screen you can select from the installed HUDs and set the default of your MFDs. Currently only the first 20 HUDs and 24 MFDs are shown.


Original HUD with 8 MFDs: OriginalHUD.png

Small HUD with 8 MFDs: SmallHUD.png


Instructions

Do not unzip the .oxz file, just move into the AddOns folder of your Oolite installation.


License

This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License version 4.0. If you are re-using any piece of this OXP, please let me know by sending an e-mail to norbylite@gmail.com.


Download

HUDSelector 1.1 (downloaded 46 times).

HUDSelector 1.0 (downloaded 524 times).


Forum

You can write about this package into the HUD Selector topic


Changelog

2014.08.11. v1.1  Interfaces and MFD handling.
                  Selections are saved into the savegame.
                  The included Original and Small HUDs has 8 MFDs.
2014.07.05. v1.0  First release.