|
@@ -73,6 +73,16 @@ void application::input()
|
|
|
if (event.key.keysym.sym == SDLK_LEFT) this->pushForce.x = 0;
|
|
|
|
|
|
break;
|
|
|
+
|
|
|
+ case SDL_MOUSEBUTTONDOWN:
|
|
|
+ if (event.button.button == SDL_BUTTON_LEFT)
|
|
|
+ {
|
|
|
+ int x, y;
|
|
|
+ SDL_GetMouseState(&x, &y);
|
|
|
+ particle *part = new particle(x, y, 1., 5);
|
|
|
+ this->particles.push_back(part);
|
|
|
+ }
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
}
|