I just started learning Raylib, and I'm trying to create something like the drawing example that they have on the website, but its not working for me. I want to click on R and spawn/draw objects on screen but the object disappears once I release the button,
if (IsKeyDown(KEY_R)) {
DrawRectangleV(SpawnRecPos, RecSize, RecClr);
}
Is there is a way to store the data when I click so that the rectangle stays on the screen?