Send events through queue instead of calling game methods directly

This commit is contained in:
Phil Marell
2021-08-08 16:59:27 +10:00
parent 744b06796d
commit 5b5fb15780
6 changed files with 54 additions and 11 deletions

View File

@@ -466,6 +466,21 @@ void HandleEvent (void)
break;
}
}
else if (theEvent.m_vosEvent.m_eventType == GpVOSEventType_t::kMenuItemSelected)
{
switch (theEvent.m_vosEvent.m_event.m_menuItemSelectionEvent)
{
case GpMenuItemSelectionEvents::kAboutGliderPRO:
DoAbout();
break;
case GpMenuItemSelectionEvents::kAboutAerofoil:
DoAboutFramework();
break;
case GpMenuItemSelectionEvents::kPreferences:
DoSettingsMain();
break;
}
}
}
else
HandleIdleTask();