Hub UI

#include <safi/ui/hub_ui.h>

The Hub UI is the launcher screen the editor shows while no project is open. It presents a recent-projects list plus New and Open actions, drawn through the same MicroUI context as the rest of the debug overlay.

void safi_hub_ui_draw(mu_Context *ctx, ecs_world_t *world, SDL_Window *window,
                      int logical_w, int logical_h);

The overlay calls this in place of the Scene/Inspector panels when safi_project_session_hub_active is true, passing the logical window size so the Hub fills the viewport. window is the parent for native folder dialogs.

Async folder dialogs

SDL folder pickers (SDL_ShowOpenFolderDialog) are asynchronous and may deliver their result on another thread. The Hub's dialog callback only stashes the chosen path and publishes it with an atomic flag; the next UI frame consumes it on the main thread and performs the project open / create. This keeps every world mutation on the main thread, where flecs defers structural changes safely.

Actions

Failures surface as an inline toast rather than asserting.

See also