From 7e693bb73f4ac9f3584a445e435b78f5d245425f Mon Sep 17 00:00:00 2001 From: Nikola Petrov Date: Sat, 2 Mar 2024 13:49:49 +0100 Subject: [PATCH] change to check if mouse/touch --- main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.cpp b/main.cpp index 3fdbfaf..cb67369 100644 --- a/main.cpp +++ b/main.cpp @@ -102,7 +102,7 @@ void generate_tree() tree[i].numOfBranches = GetRandomValue(1, 3); - tree[i].lenghthRatio = ((float)GetRandomValue(600,700)) / 1000.0f; + tree[i].lenghthRatio = ((float)GetRandomValue(600, 700)) / 1000.0f; } tree[0].color = tree[1].color; @@ -136,7 +136,7 @@ int main(void) while (!WindowShouldClose()) { - if (IsKeyPressed(KEY_R)) + if (IsMouseButtonPressed(MOUSE_BUTTON_LEFT)) { new_tree(); }