mirror of
https://github.com/ocornut/imgui.git
synced 2026-03-30 21:05:54 -05:00
iOS example: shallow tweaks and fixes (untested)
This commit is contained in:
@@ -9,20 +9,19 @@
|
||||
|
||||
void DebugHUD_InitDefaults( DebugHUD *hud )
|
||||
{
|
||||
hud->show_test_window = 1;
|
||||
hud->show_example_window = 1;
|
||||
hud->rotation_speed = 15.0;
|
||||
hud->show_test_window = true;
|
||||
hud->show_example_window = true;
|
||||
hud->rotation_speed = 15.0f;
|
||||
|
||||
hud->cubeColor1[0] = 0.4;
|
||||
hud->cubeColor1[1] = 0.4;
|
||||
hud->cubeColor1[2] = 1.0;
|
||||
hud->cubeColor1[3] = 1.0;
|
||||
|
||||
hud->cubeColor2[0] = 1.0;
|
||||
hud->cubeColor2[1] = 0.4;
|
||||
hud->cubeColor2[2] = 0.4;
|
||||
hud->cubeColor2[3] = 1.0;
|
||||
hud->cubeColor1[0] = 0.4f;
|
||||
hud->cubeColor1[1] = 0.4f;
|
||||
hud->cubeColor1[2] = 1.0f;
|
||||
hud->cubeColor1[3] = 1.0f;
|
||||
|
||||
hud->cubeColor2[0] = 1.0f;
|
||||
hud->cubeColor2[1] = 0.4f;
|
||||
hud->cubeColor2[2] = 0.4f;
|
||||
hud->cubeColor2[3] = 1.0f;
|
||||
}
|
||||
|
||||
void DebugHUD_DoInterface( DebugHUD *hud )
|
||||
@@ -30,24 +29,17 @@ void DebugHUD_DoInterface( DebugHUD *hud )
|
||||
if (hud->show_test_window)
|
||||
{
|
||||
ImGui::SetNextWindowPos( ImVec2( 400, 20 ), ImGuiSetCond_FirstUseEver );
|
||||
bool show_test_window = hud->show_test_window;
|
||||
ImGui::ShowTestWindow( &show_test_window );
|
||||
hud->show_test_window = show_test_window;
|
||||
ImGui::ShowTestWindow( &hud->show_test_window );
|
||||
}
|
||||
|
||||
if (hud->show_example_window)
|
||||
{
|
||||
bool show_window = hud->show_example_window;
|
||||
ImGui::SetNextWindowPos( ImVec2( 20, 20 ), ImGuiSetCond_FirstUseEver );
|
||||
ImGui::SetNextWindowSize( ImVec2( 350, 200 ), ImGuiSetCond_FirstUseEver );
|
||||
ImGui::Begin("Another Window", &show_window);
|
||||
hud->show_example_window = show_window;
|
||||
|
||||
ImGui::Begin("Another Window", &hud->show_example_window);
|
||||
ImGui::ColorEdit3("Cube 1 Color", hud->cubeColor1);
|
||||
ImGui::ColorEdit3("Cube 2 Color", hud->cubeColor2);
|
||||
ImGui::SliderFloat("Rotation Speed", &(hud->rotation_speed), 0.0f, 200.0f);
|
||||
|
||||
ImGui::SliderFloat("Rotation Speed", &hud->rotation_speed, 0.0f, 200.0f);
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user