Open main menu

UESPWiki β

Skyrim Mod:SkyProc/How to List/DefaultGUI

< Mod / Skyrim: Skyrim Mod: SkyProc

How ToEdit

Add SkyProc's Default GUIEdit

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 StartEdit

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 EndEdit

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 TweaksEdit

Changing Header ColorEdit

You can change the color of the title by adding:

gui.setHeaderColor(aColor);

Adding Custom ComponentsEdit

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.