@@ -22,6 +22,11 @@ void DebugHUD_InitDefaults( DebugHUD *hud )
22
22
hud->cubeColor2 [1 ] = 0 .4f ;
23
23
hud->cubeColor2 [2 ] = 0 .4f ;
24
24
hud->cubeColor2 [3 ] = 1 .0f ;
25
+
26
+ hud->clearColor [0 ] = 0 .45f ;
27
+ hud->clearColor [1 ] = 0 .55f ;
28
+ hud->clearColor [2 ] = 0 .60f ;
29
+ hud->clearColor [3 ] = 1 .00f ;
25
30
}
26
31
27
32
void DebugHUD_DoInterface (DebugHUD *hud)
@@ -33,7 +38,7 @@ void DebugHUD_DoInterface(DebugHUD *hud)
33
38
static int counter = 0 ;
34
39
ImGui::Text (" Hello, world!" ); // Display some text (you can use a format string too)
35
40
ImGui::SliderFloat (" float" , &f, 0 .0f , 1 .0f ); // Edit 1 float using a slider from 0.0f to 1.0f
36
- ImGui::ColorEdit3 (" clear color" , ( float *)&clear_color); // Edit 3 floats representing a color
41
+ ImGui::ColorEdit3 (" clear color" , hud-> clearColor ); // Edit 3 floats representing a color
37
42
38
43
ImGui::Checkbox (" Demo Window" , &hud->show_demo_window ); // Edit bools storing our windows open/close state
39
44
ImGui::Checkbox (" Another Window" , &hud->show_another_window );
@@ -49,7 +54,7 @@ void DebugHUD_DoInterface(DebugHUD *hud)
49
54
// 2. Show another simple window. In most cases you will use an explicit Begin/End pair to name your windows.
50
55
if (hud->show_another_window )
51
56
{
52
- ImGui::Begin (" Another Window" , &hud-? show_another_window);
57
+ ImGui::Begin (" Another Window" , &hud-> show_another_window );
53
58
ImGui::Text (" Hello from another window!" );
54
59
ImGui::ColorEdit3 (" Cube 1 Color" , hud->cubeColor1 );
55
60
ImGui::ColorEdit3 (" Cube 2 Color" , hud->cubeColor2 );
0 commit comments