-
Notifications
You must be signed in to change notification settings - Fork 0
/
temp2.c
34 lines (30 loc) · 822 Bytes
/
temp2.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <stdio.h>
#include "raylib.h"
void
main(int argc, char **argv)
{
InitWindow(500, 500, "helo");
Texture2D t = LoadTexture("g.png");
SetTargetFPS(30);
while (!WindowShouldClose()) {
int kp = GetKeyPressed();
if (kp) {
printf("KP: %d\n", kp);
}
if (IsKeyDown('Q')) break;
Vector2 mp = GetMousePosition();
BeginDrawing();
{
ClearBackground(BLACK);
DrawTexture(t, 0, 0, WHITE);
DrawRectangleLines(0, 0, 172, 187, RED);
if (IsMouseButtonDown(MOUSE_BUTTON_LEFT))
DrawCircleV(GetMousePosition(), 16, RED);
if (IsMouseButtonPressed(MOUSE_BUTTON_LEFT))
DrawCircleV(GetMousePosition(), 16, BLUE);
if (IsMouseButtonReleased(MOUSE_BUTTON_LEFT))
DrawCircleV(GetMousePosition(), 16, ORANGE);
}
EndDrawing();
}
}