Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "raylib.h"
- #include <stdlib.h>
- #include <stdint.h>
- int main(int argc, char** argv) {
- srand(time(NULL));
- InitWindow(1366, 768, "Window");
- Color clr = (Color){0x000000FF};
- int64_t clickCount = 0;
- SetTargetFPS(3);
- while (!WindowShouldClose())
- {
- if (IsMouseButtonPressed(MOUSE_BUTTON_LEFT)) {
- clickCount++;
- printf("LMB clicked %ld times\n", clickCount);
- }
- clr.r = rand() % UINT8_MAX / 16;
- clr.g = rand() % UINT8_MAX / 16;
- clr.b = rand() % UINT8_MAX / 16;
- clr.a = 0xFF;
- BeginDrawing();
- ClearBackground(clr);
- EndDrawing();
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement