Hi,
Why projects?
- Because it is work in progress.

Why is it not the holy grail of GUI systems?
- Because, at least the d3d9 system of CEGUI is not very fast. For example, lists with many entries, let's say 50, are slow as hell.
- Skinning is annoying
- The editors are a joke, they lack a lot of features and crashes if you look at them too long.

Here is the link to the binaries only:
CEGUI Zip

How to use it:

First step:
You have to copy the DLLs and the datafiles folder in your GS project folder.
Important: You need the datafiles folder - datafiles folder must be in the mainproject folder
Of course you have to copy the headerfiles into your project folder, too.

Second step:
Include the "LCEGUI.h" in your header
Note: you should include it after acknex standart header

Third step:
Call: "void CEGUI_Start(int keyboardLayout, BOOL mouse_visible)"
- KeyboardLayout: 1 = USA; 2 = German
- mouse_visible - is mouse visible at start? It can be changed later
Important - CEGUI_Start does following:
- It inits the cegui system
- It binds the rendering routine to the render_layer function of Lite-C
- It sets the visibility of the CEGUI intern mouse cursor
- It bind's the on_scanmessage function to CEGUI for keyboard input - because directInput is totaly different to CEGUI utf32 codes - I try to fix that
- It bind's on_d3d_lost and on_d3d_reset to the CEGUI system - that prevent's crashing due to resolution changes

Fourth Step:
Now you have to load content from the datafiles folder.
Example:
CEGUI_LoadFont( "DejaVuSans-10.font" ); //loads a font definition from the font folder - you should edit the existig xml files to deactivate automatic font-scaling (it is terrible - not my fault)
CEGUI_LoadLooknFeel( "WindowsLook.scheme" ); //Obvious it loads a Scheme file for the so called look and feel - this example load's a xp-look into the memory - I am working on a nice look at the moment, which I will contribute
CEGUI_SetDefaultMouseMap( "WindowsLoook", "MouseArrow"); // Set's up the default mouse arrow
CEGUI_LoadImageset("icons.imageset"); // Load an imageset into the memory for customized icons, for example. It is not recomended to load images directly.


Mini Tutorial:

Code:
... // start CEGUI

void *rootWindow; //You need void* pointers - but if you look into my header, you recognize that you can just create the windows and change them by using their names it is not recomended
void *tools;

void CEGUI_Event(void *data) //needs the void pointer, because c++ classes are passed
{
    CEGUI_FillWindowEventArgs(data, &windowEventArgs); //Important: lookup which event class is passed in the CEGUI Event-reference
    //the windowEventArgs is pre creaded struct, to help you get your information. Of course you can use your own - look into the "LCEGUI_events" header for more information
}

void createGui()
{
    rootWindow = CEGUI_CreateRootWindow(); //It fills the whole screen_area
    tools = CEGUI_CreateElement(rootWindow, "WindowsLook/FrameWindow", "tools", 0, 0, 0, 0, 0, 138, 0, 192); //please look into the CEGUI reference for infos about positioning x1 - realtive x2 - absolute (if x1 and x2 are set x2 is the offset) y1 - relatice y2 - absolute w1 - realtice w2 - absolute
    //Realitce coordiantes are normalized to 0 - 1. Example: a w1 = 1 mean's the panel is stretched about the whole screen.

    //Events
    CEGUI_BindEvent(tools, "MouseEnter", CEGUI_Event); //Please look into the CEGUI event reference to look up the event names
    
    //properties
    CEGUI_SetProperty(tools, "Alpha", "0.5"); //You can change properties by name, but I created a lot of helper functions to change general properties.
}


Last edited by jenGs; 10/13/12 21:06.