diff --git a/examples/controls_test_suite/controls_test_suite.c b/examples/controls_test_suite/controls_test_suite.c index 79f7d1e..21ed5cc 100644 --- a/examples/controls_test_suite/controls_test_suite.c +++ b/examples/controls_test_suite/controls_test_suite.c @@ -120,6 +120,8 @@ int main() char textInputFileName[256] = { 0 }; + float alpha = 1.0f; + SetTargetFPS(60); //-------------------------------------------------------------------------------------- @@ -143,9 +145,17 @@ int main() UnloadDroppedFiles(droppedFiles); // Clear internal buffers } - progressValue += 0.002f; - //if (progressValue >= 1.0f) progressValue = 0.0f; - if (IsKeyPressed(KEY_SPACE)) progressValue = 0.2f; + //alpha -= 0.002f; + if (alpha < 0.0f) alpha = 0.0f; + if (IsKeyPressed(KEY_SPACE)) alpha = 1.0f; + + GuiSetAlpha(alpha); + + //progressValue += 0.002f; + if (IsKeyPressed(KEY_LEFT)) progressValue -= 0.1f; + else if (IsKeyPressed(KEY_RIGHT)) progressValue += 0.1f; + if (progressValue > 1.0f) progressValue = 1.0f; + else if (progressValue < 0.0f) progressValue = 0.0f; if (visualStyleActive != prevVisualStyleActive) {