Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDL2 in c++ include Event of Mouse and Keyboard and Rendering to draw a rectangle #2052

Open
Suchit1938 opened this issue Oct 8, 2024 · 1 comment

Comments

@Suchit1938
Copy link

  1. Initialization and Window Creation:
    You correctly initialize SDL and create a window and renderer.
  2. Event Handling:
    You handle SDL_QUIT to exit the loop.
    You handle SDL_KEYDOWN to move the rectangle based on key presses.
    You handle SDL_MOUSEMOTION to move the rectangle based on mouse movement.
  3. Rendering:
    You set the draw color and clear the renderer.
    You draw the rectangle and present the renderer.
@Suchit1938
Copy link
Author

I am currently doing SDL project. I can do this plz, assign this to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant