Jump to content

[1.0.2] KSC Building Shortcuts : Unity 4.6 UI [v1.0] [5/23/1015]


DMagic

Recommended Posts

Go to my [thread=120731]mod collection thread[/thread] for updates and more info on this addon.

6dbXGzN.png

Download on Kerbal Stuff

Download on GitHub

CKAN-Indexed-brightgreen.svg

Source is available on GitHub.

This simple addon includes ten UI buttons that can be used to open each of the KSC buildings.

Left-clicks will open the building if possible (if the building is destroyed or unavailable because of Sandbox mode, etc... it won't open). Right-clicks will open the building upgrade/repair window. Hovering the mouse over the button will cause the corresponding building to be highlighted.

Keyboard shortcuts using the top number row are indicated for each button and can be used to open it.

Each building's icon is mostly self-explanatory and most of them use the R&D center icons.

----------------

For those interested more in the Unity 4.6 UI this also serves as a simple example of how to create a few UI objects using the new system.

Most of the code comes from this link, the only real scripting example I have found. The system doesn't seem so friendly to UI's made entirely through scripting and Unity's documentation is very sparse.

I can't get the buttons to appear on top of the bottom bar in case anyone is wondering. That would be the logical place for them to go, but that bar seems to be rendered on top of everything else (though I can get it working fine with OnGUI...).

Released under the MIT License

Edited by DMagic
Link to collection thread
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...