12. GLoader

GLoader is a feature of GWindows to help users get started quickly, and share their developed UIs with the community. You do not need to use GLoader, but it may simplify your development process. A collection of GLoader UIs can be found at http://gwindows.trenchcoatsoft.com

12.1 Using GLoader

The easiest way to use GLoader is to download the GLoader Template/Gallery source code from http://gwindows.trenchcoatsoft.com and use it as a skeleton for your game. Alternatively, read documentation in gloader.h for more detailed usage instructions

12.2 GLoader UIs

A GLoader UI Consists of the following pieces:

The .h file, which should be included in your source code, will provide a UI you can use like any other. It is preferable to use the GLoader API to load the interface rather than the techniques explained earlier in this manual. You may attach as many UIs to a game as you like. The gltemplate program shows a method for switching between UIs at the user's request.

12.2.1 GLoader Skins

UIs which make use of graphics may offer more than one graphics set (or "skin"). To use a skin other than the default, simply include the resource definition file for the skin in your blorb resources.

Due to a technical limitation, it is not currently possible to include two skins for the same UI in a single game without doing significant work by hand.

12.2.2 Customizing UIs

The easiest way to customize a UI is by writing a new skin for it. To do this, simply duplicate the skin's resource definitions, replacing the graphics with your own.

You can also alter the UI's source using the techniques given in the rest of this manual. Some UIs may provide additional simple customizations and features. Check their documentation for details.

12.3 GLoader API features

Gloader provides some additional functionality to make it easier for you to write code that will operate with a choice of UIs. gloader.h contains more detailed information on these features. Among GLoader's functionalities are: