iakov.dev

CEGUI vs IMGUI

Bloated UI

· 1 min read

This is the code to create a button in CEGUI:

// Create window
wnd = CEGUI::WindowManager::getSingleton().createWindow("TaharezLook/Button", "JumpPushButton");
wnd->setPosition(CEGUI::UVector2(CEGUI::UDim(0.75,0),CEGUI::UDim(0.50,0)));
wnd->setSize(CEGUI::UVector2(CEGUI::UDim(0,50),CEGUI::UDim(0,50)));
wnd->setText("Jump!");
CEGUI::System::getSingleton().getGUISheet()->addChildWindow(gJumpBtnWindow);

It’s ugly. It reminds me of a joke by Charles Bloom: how to lose game developer love.

Here is how creating and using a button should look:

if ( gui.button("Cancel")  )
   cancel_job();