A simple to use Immediate Mode UI library written in C. This is in an early state and all APIs may change.
- Five different layout methods
- Toolbox with a lot of generic widgets like: Button, Check Box etc.
- Bitmap font generation
- C++ API wrapper included
- a lot more
void doUi( ImUiContext* imui, float time )
{
ImUiFrame* frame = ImUiBegin( imui, time );
ImUiSurface* surface = ImUiSurfaceBegin( frame, IMUI_STR( "main" ), ImUiSizeCreate( (float)s_context.windowWidth, (float)s_context.windowHeight ), 1.0f );
ImUiWindow* window = ImUiWindowBegin( surface, IMUI_STR( "main" ), ImUiRectCreateSize( 0.0f, 0.0f, surfaceSize ), 1 );
ImUiWidget* buttonsLayout = ImUiWidgetBeginNamed( window, IMUI_STR( "buttons" ) );
ImUiWidgetSetStretch( buttonsLayout, ImUiSizeCreateZero() );
ImUiWidgetSetLayoutHorizontalSpacing( buttonsLayout, 10.0f );
if( ImUiToolboxButtonLabel( window, IMUI_STR( "Button 1" ) ) )
{
// do stuff
}
if( ImUiToolboxButtonLabel( window, IMUI_STR( "Button 2" ) ) )
{
// do stuff
}
if( ImUiToolboxButtonLabel( window, IMUI_STR( "Button 3" ) ) )
{
// do stuff
}
ImUiWidgetEnd( buttonsLayout );
ImUiWindowEnd( window );
ImUiSurfaceEnd( surface );
ImUiEnd( imui );
}
Just import all files in include
and src
in your project and add include
as include directory.
To build the samples is current tiki_build required. Use the provided batch files to generate Visual Studio files.
- fix layout bugs
- multiline text
- use pool for surface and window(broken pointer on resize)
- more