Replay (#16)
Recording and replay system for Box3D. Ported from Box2D. b3HeightField is now b3HeightFieldData and is a blob.
This commit is contained in:
parent
09c65b08ea
commit
5c9b516486
56 changed files with 10837 additions and 448 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue