UntitledImGuiFramework allows you to add standard window decorations to your main bar. This way, you can have a more compact interface that looks native to your app, rather than to the OS.

Setting up the bar

Modify your title bar code to look like this:

if (ImGui::BeginMainMenuBar())
{
    UImGui::ClientSideBar::Begin();

    // Your code here

    UImGui::ClientSideBar::End();
    ImGui::EndMainMenuBar();
}

Additionally, you can provide flags to UImGui::ClientSideBar::End. By default, it is set to UIMGUI_CLIENT_SIDE_BAR_FLAG_ALL. The UImGui::ClientSideBarFlags enum looks like this:

typedef enum UImGui_ClientSideBarFlags
{
    UIMGUI_CLIENT_SIDE_BAR_FLAG_NONE = 0,
    UIMGUI_CLIENT_SIDE_BAR_FLAG_MINIMISE_BUTTON,
    UIMGUI_CLIENT_SIDE_BAR_FLAG_MAXIMISE_BUTTON,
    UIMGUI_CLIENT_SIDE_BAR_FLAG_CLOSE_BUTTON,
    UIMGUI_CLIENT_SIDE_BAR_FLAG_MOVEABLE,
    UIMGUI_CLIENT_SIDE_BAR_FLAG_ALL = UIMGUI_CLIENT_SIDE_BAR_FLAG_MINIMISE_BUTTON
                                    | UIMGUI_CLIENT_SIDE_BAR_FLAG_MAXIMISE_BUTTON
                                    | UIMGUI_CLIENT_SIDE_BAR_FLAG_CLOSE_BUTTON
                                    | UIMGUI_CLIENT_SIDE_BAR_FLAG_MOVEABLE
} UImGui_ClientSideBarFlags;

You also have the ability to provide custom colours for the hover and active modes of the close button. By default, the last 2 parameters, of type FVector4 are set to { 0.753f, 0.110f, 0.157f, 1.0f }, { 0.972f, 0.894f, 0.360f, 1.0f }.

C API

The following functions are part of the client-side bar C API:

  1. void UImGui_ClientSideBar_Begin() - equivalent to UImGui::ClientSideBar::Begin
  2. void UImGui_ClientSideBar_End(UImGui_ClientSideBarFlags flags, UImGui_FVector4 destructiveColour, UImGui_FVector4 destructiveColourActive) - equivalent to UImGui::ClientSideBar::End