Recording and replay system for Box3D. Ported from Box2D.

b3HeightField is now b3HeightFieldData and is a blob.
This commit is contained in:
Erin Catto 2026-06-20 23:35:04 -07:00 • committed by GitHub
commit 5c9b516486
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
56 changed files with 10837 additions and 448 deletions

View file

@ -103,18 +103,22 @@ static void OnEvent( const sapp_event* e )
return;
}
const bool imguiCaptured = HandleEvent( e );
bool uiCaptured = false;
if (s_context.camera.m_thirdPerson == false)
{
uiCaptured = HandleEvent( e );
}
// The camera must always see button releases and focus loss, even when the UI
// captures the event. Otherwise a release over an ImGui panel never clears the
// drag flag and the camera keeps orbiting.
const bool releaseOrUnfocus = e->type == SAPP_EVENTTYPE_MOUSE_UP || e->type == SAPP_EVENTTYPE_UNFOCUSED;
if ( imguiCaptured == false || releaseOrUnfocus )
if ( uiCaptured == false || releaseOrUnfocus )
{
s_context.camera.OnEvent( e );
}
if ( imguiCaptured )
if ( uiCaptured )
{
return;
}