Examples: Updated for reorganized context functions. Calling CreateContext(), DestroyContext() in example code. Removed Shutdown() from binding code. (#1565, #586, #992, #1007, #1558)

This commit is contained in:
omar
2018-01-21 20:09:30 +01:00
parent 5e2aa6185c
commit d3e826c247
21 changed files with 31 additions and 15 deletions

View File

@ -207,8 +207,6 @@ void ImGui_Marmalade_InvalidateDeviceObjects()
bool ImGui_Marmalade_Init(bool install_callbacks)
{
IwGxInit();
ImGuiIO& io = ImGui::GetIO();
io.KeyMap[ImGuiKey_Tab] = s3eKeyTab; // Keyboard mapping. ImGui will use those indices to peek into the io.KeyDown[] array.
io.KeyMap[ImGuiKey_LeftArrow] = s3eKeyLeft;
@ -248,8 +246,6 @@ bool ImGui_Marmalade_Init(bool install_callbacks)
void ImGui_Marmalade_Shutdown()
{
ImGui_Marmalade_InvalidateDeviceObjects();
ImGui::Shutdown();
IwGxTerminate();
}
void ImGui_Marmalade_NewFrame()

View File

@ -14,7 +14,10 @@
int main(int, char**)
{
IwGxInit();
// Setup ImGui binding
ImGui::CreateContext();
ImGui_Marmalade_Init(true);
// Setup style
@ -95,6 +98,8 @@ int main(int, char**)
// Cleanup
ImGui_Marmalade_Shutdown();
ImGui::DestroyContext();
IwGxTerminate();
return 0;
}