Vimana-X HUD
============
By Gnievmir and phkb

Overview
========
Gnievmir's original Vimana HUD has earned a lot of praise for the stylish layout of the graphical dials and other UI bells and whistles. However, I always struggled to choose it for a number of reasons:
- It seemed to be designed with a single font in mind. Using a different font leads to a lot of text overrunning the graphical bounds of the UI, or not aligning correctly.
- It also seemed to be designed with a very specific group of OXP's in mind. If those OXP's are missing then parts of the UI were effectively useless.
- When viewing any of the F5-F8 pages during flight, or when going to the F2 screen after pausing, the HUD would overlap parts of the screen, making some things difficult to read.
- The Ship info and Target info panels are useful, but only a limited number of ships would be shown as an image.
- The "Mode" information for certain primable OXP equipment items was limited in what it would show.
- The jump distance indicator on the fuel gauge would only show after the Travel Module was purchased.
- An "uber" laser was included in the original Vimana HUD, as well as a targeting equipment item. Both were better suited to separate OXP's.

So, I embarked on a tweaking session, which turned into a design/layout session, which turned into a much bigger update than I was expecting. However, I feel the result is worth it. Here's a complete breakdown of everything I did:

1. I divided the UI up into two, with only the scanner and core dials and gauges showing whenever a non-viewscreen view is selected.
2. I repositioned some components to allow for some greater flexibility with other items. I repositioned the injectors icon, the fuel scoop icon, and the fuel warning icon to be inside the speed, cargo and fuel gauges respectively, which allowed me to move the shield capacitors icon, shield cycler icon and EEU icons to the left side of the UI. This then allowed enough room to add an additional gauge which is used for aft armour (at present, this is only used by Ship Configuration, but if other OXP's deploy aft shields it can be configured to use that as well).
3. I darkened the background of the UI substantially, making it less transparent, and therefore better able to cope with high-glare environments. But in case anyone was particularly attached to the "light" version, it can still be used as an option (selectable from an F4 interface screen).
4. I reworked much of the text alignment code to ensure all the displays would work well with every font available. So columns will line up, text will be centred where required, and text items will not go beyond the bounds of the UI (mostly!).
5. I looked at how it works with other OXP's and tried to expand the possibilities and remove the locked-in feeling with some of the UI elements. In particular, the Anti-missile system and the Self-Repair system, which had their own lines on the UI. I switched this for a customisable system to allow for future OXP integrations, and added a couple of extra options to select from. There is now a F4 interface page, "Vimana-X HUD Settings" where the different options can be selected.
6. I expanded the "MODE" display for primable equipment, finding as many OXP's as I could that make use of this feature and adding the appropriate text.
7. I added alert icons inside each of the items that can cause alerts (altitude, cabin temp, energy, shields), and a missile warning icon in the combat HUD, to complement the larger warnings that appear at the top of the screen. If you find the top screen icons too intrusive, they can be turned off via the interfaces page, leaving just the smaller alert icons on the HUD. Also, I removed the text from the alert images, leaving them as images, and added text to the HUD, so that the warnings will appear in whatever font the player has chosen to use.
8. I added a bunch (600+!) of extra ship images from a variety of sources, so chances are a ship image will display in the left panel in the majority of cases. I also redid the existing images, because I couldn't reproduce the style of the original. What I've used is the wireframe version of all the ships, which carries a nice blueprint/schematic style to the ships. If I've left out your favourite ships, just let me know and I'll include them in a future release.
9. I changed the way the "scan" component works. In the original HUD, different parts of your ship would be highlighted individually, as if a "scan" was taking place. However, given the number of new ship images I was adding, it would be a mammoth task to divide each one up into four to keep that system. So I implemented a new "scan" that will work for whatever ship is displayed.
10. I changed the colour of the jump distance indicator in the fuel gauge, to make it stand out more. 
11. I changed the source of the targeted ship's weapon, taking it from Combat MFD's data, so that it matches what you see in that MFD, but also so that some information isn't revealed before the player has any right to know.
12. I added an icon for the naval energy unit, to make it distinct from the normal one.
13. To aid with startup timeout issues, I made the various timers start in sequence, and play a small sound when they turn on, to indicate the systems are starting up.
14. I added a 10-MFD version of the HUD, as well as reducing the size of the lower left and right MFD's on the 12-MFD version, to prevent them from overlapping the UI on a 16:9 display. If you use the 12-MFD HUD, and your screen dimensions cause the lower left and right MFD's to overlap the UI, and it doesn't make your eyes twitch, then everything is fine! But if you find small details like that really annoying, and you really need all the MFD's you can get, I'd recommend the 10-MFD version. I won't judge.
15. I turned on the non-linear scanner and ultra zoom options on the HUD. Plus added options to change these settings on the F4 interface page.
16. The Alt gauge will now reset when entering interstellar space.
17. Only equipment that is visible on the F5 page will be shown on any damaged equipment list.
18. Lots of small bug fixes, code tweaks and performance improvements.
19. I removed the targeting equipment item and the "uber" laser. It's now just a HUD. If you really want to keep those items, you should keep the original Vimana HUD OXP installed. There should be no conflicts between the HUDs.

If you have previously used the Vimana HUD, and purchased the Target, Travel and Ship modules for it, you will have those modules added automatically when you install this HUD. 

License
=======
Creative Commons Attribution Non-Commercial Share-Alike 4.0 (https://creativecommons.org/licenses/by-nc-sa/4.0/)

Version History
===============
1.27
- Added equipment link to Hyper Radio 2.
- Tweaks to how satellites are displayed in the target module.

1.26
- Moved all text into descriptions.plist for easier localisation.
- Added code to clear the players target when switching between ident and missile target modes.
- Small tweak to logic for determining if a target is a ship or not.
- Hopefully some performance boost from refactoring code to make localisation easier.

1.25
- Switched the custom name to be right aligned, rather than left aligned.

1.24
- When a target entity has a custom name, it will now be put on a separate line, below the ship class name.

1.23
- Refuelling stations now show energy and collision radius when targeted.
- Equipment damaged or repaired in dock will now longer generate an error.

1.22
- Fixed bug that was causing the travel info to be calculated and displayed over and over.
- Fixed issue with globe image.

1.21 
- Added rgba_background to message_gui element.
- Added individual images for all asteroids, boulders, fragments and splinters.
- Split off the ship images into a separate OXP (Wireframe Ship Images) to make it easier for other OXP authors to leverage the images, and so this OXP doesn't need to be updated as much.
- Re-enabled ship scan and shield graphics (forgot to turn them on again after testing!)

1.20
- Performance improvements.
- Added image for Sidewinder NG
- Added more Thargoid/Tharglet images, and improved identification for various Thargoid Warships and Robot Fighters.
- Added/tweaked images for Thargoid vessels in TCAT 2.0.
- Added some missing Feudal States images.
- Added image for Cobra Mk IX.
- Added image for Sidewinder NG.
- Max normal speed now always shown correctly on speed dial.

1.19
- Added images for Revolutionary AstroFarms and Revolutionary Logistics.

1.18
- Added image for Fruit Bat and Flying Fox.
- Added missing Rock Hermit disambiguation link for Pirate Coves.
- Carriers that are ships will now have their speed displayed in the left panel when targeted, instead of their collision radius.

1.17
- Added images from Lave Academy.
- Added images from Coluber Racers.
- Added image from STE.
- Improved detection of Xenon UI amber mode on startup.
- Improved protection against missing data from Extra Rock Hermits.

1.16
- Added images for Extra Rock Hermits.

1.15
- Added images for Jump Gates.
- Added images for Nuit Vampires.
- Added images for Isis Interstellar.

1.14
- Fixed for NaN showing in space compass distance when Manual Witchspace Alignment target is selected.
- Clock on docked HUD is now right-aligned to the game window no matter what font is used.
- Some code refactoring.

1.13
- Small tweak to the compass target distance display, so "km" remains the scale up to 9999km before switching.

1.12
- Fixed issue with missile warning system not working reliably,
- Added primable equipment info for Ejection Damper (from GalCop Missions OXP).
- Tweaked the distance to target element, so large values should fit into the UI bounds better.
- Space compass target distance made to stay within bounds.
- Speed value will now stay within bounds.
- Added disambiguation for Kiota Habitat Stations (could be 2 ring, 4 ring or 4 ring variant).
- Added code to read Telescope V2 mode (only available with Telescope v2.1.4).

1.11
- Added some missing station image lookups.
- Rotated some station images for consistency.
- Tweaked the compass image for less graininess.
- Further improvements to the MFD background clearing process.
- Added extra system info to witchspace destination label when docked.
- Added station name and current system name and info to docked HUD.
- Missile data in the target information panel now only shows what type of missile the target has launched.
- Used cargo space of the target is now only visible if Manifest Scanner has scanned ship.
- Added missing Sidewinder image, now distinct from Sidewinder Escort.
- Added disambiguation keys for ships named "Sidewinder Scout Ships" (which could be Sidewinders or Sidewinder Escorts).

1.10
- Better protection against undefined results when targeting ships.

1.9
- Fixed issue with docked HUD not showing hyperspace destination unless a system map concealment OXP was active and systems had been revealed.
- Added docked HUD amber mode, which is auto-selected if XenonUI is active and has it's amber mode turned on.
- Fixed a number of errors with ship images (missing files, mis-named files and incorrect lookups).

1.8
- Added ship images for Sniper Gun ships.
- Added ship images for Riredi OXP ships.
- Added ship speed to combat crosshairs.

1.7
- Fixed issue where route information was not showing in left side panel unless a system map concealment OXP was active and systems had been revealed.
- Switched gauges for Alt, Energy, Front/Aft Shield, and Front/Aft Armour to have biggest dial segment for the smallest (and most critical) value.
- Fixed issue where Ironhide armour percentage could have excessive decimal points.
- Made flashing warning labels stay on screen for longer for better readability.
- Fixed issue preventing Shield Cycler icons from appearing.
- Removed incompatibility settings with Shield Cycler.
- Switched alerting function calculation of altitude to use Combat MFD's calculation, rather than doing it again.
- Linked up colour of the Manual Witchspace Alignment jump beacon to match UI colours.
- Some code refactoring.

1.6
- Fixed issue with target speed values showing as "undefined".
- More improvements to the MFD background clearing process.
- Fixed spelling error for Vampire Mk6 image.
- Fixed spelling error for Boomslang MkIII image.
- Fixed spelling error for Raptor Defense Interceptor image.
- Corrected station identification for Solo's Alt Stations.
- Fixed JS error when targeting a system that cannot be reached.
- Small tweak to the character width of the speed value, so it doesn't overflow the UI when speed is high and using wide fonts.

1.5
- Added fuel leak warning.
- Cleaned up issue where MFD background images were not being removed when the MFD slot was cleared, in some cases.
- Fixed a couple of issues where JS errors would occur when the player ship was destroyed.
- Fixed issues where the witchspace destination would read "(Unknown)" when no destination had been set.
- Moved storage of missile monitoring array to somewhere where it shouldn't be overwritten or lost.
- Bug fixes.

1.4
- Target info for escape pods now just shows speed and bounty.
- Fixed issue where not all cargo containers were getting an image in the target info.
- Made the background of MFD's a bit darker when in "dark" mode.
- Changed the colour of the MFD's to green to match the rest of the UI.
- Switched to CombatMFD's target speed value, for consistency between that MFD and the target info displayed here.
- Switched to CombatMFD's altitude calculation, as there's no need to calculate the same number twice.
- Borrowed missile tracking system from XenonHUD for improved performance.
- Resized most of the image files to save Oolite time resizing them after starting.
- Made the HUD work properly without HUD Selector installed.
- Better integration with HUD Selector, particularly the number of MFD's shown as available.
- Added options to sell each of the mods.
- Witchspace destination and the travel mod now honour the concealment property on systems.
- Added more ship images.
- Code cleanup and refactoring.

1.3
- Added ship images for the Accipiter, Boomslang Mk3 and Mk4, Constore buoys, Copperhead Yari, Escortdeck ships including the S8, Farstar Murderer, Far Arm ships, Firefly, King Cobra MkI, Metal alloys, Morrigan, Mosquito, Outrider, S9 Firefly, Shuriken, Shrike, Swift, Scimitar, Stingray, Scorpius, Tembo, Tepiu, Wyvern, Snark, YAH billboard, Montana05's resource pack items, plus a couple of items I missed from Armoury.

1.2
- Stopped auto-awarding all mods to player, regardless of whether they'd purchased the Vimana HUD equivalents.
- Fixed a bug with checking route distance when no route set.
- Tweaks to the Heat sink special slot output. Will now display "0 avail" when no heat sinks are left, rather than a blank.

1.1
- Adjusted the F4 options page to better handle all options being visible.
- Added options for setting Ultra Zoom and Non-Linear scanner to the options page.
- Added joystick sensitivity indicator to the HUD.
- Added ship images for the FdL Lightspeeder, Stormbrewer, Kracken, Draven ships, Armory items, Phantom, Spectre, SKS Plasma Mk1, Heavy Metal ships, ADCK Bulk Haulers, Saiph Interceptor, Rigel Tactical Bomber, Star Destroyer, Star Destroyer Shuttle, Tie Fighter and Tie Interceptor.
- Some code refactoring.

1.0
- Initial release
