Skyrim Mod:SkyProc/How to List/DefaultGUI
Contents
How To[edit]
Add SkyProc's Default GUI[edit]
NOTE: This tutorial is for the old Default GUI with no settings: Just message text and a progress bar. The SkyProc Starter project comes with a newer SUM GUI built in. This tutorial is only for programmers starting a project from scratch that want to use the simple old Default GUI.
Adding SkyProc's GUI is meant to be simple and painless. All you need to add is two lines:
SPDefaultGUI gui = new SPDefaultGUI("myPatcherName", "myPatcherDescription"); .... All your importing / processing code .... gui.finished();
Initialize at Start[edit]
Creates a SPDefault GUI Object.
The first parameter in SPDefaultGUI is the title to put at the top of the GUI. The second parameter in SPDefaultGUI is the description text to put in the middle.
Make sure to declare the GUI object early on; You don't want the GUI being created after you've imported/exported your patch.
Wrap up at End[edit]
gui.finished() tells the GUI to display the "finished" message to the user.
Put this line at the end of your code, when everything is finished.
Extra Tweaks[edit]
Changing Header Color[edit]
You can change the color of the title by adding:
gui.setHeaderColor(aColor);
Adding Custom Components[edit]
You can also add your own custom Java GUI objects to the SkyProc default GUI by using it's add() function, as expected with any GUI container.