2024-10-15 02:59:26 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
2024-10-20 23:42:38 +02:00
|
|
|
#include "datatypes.h"
|
2024-10-15 02:59:26 +02:00
|
|
|
#include "raylib.h"
|
|
|
|
|
#include "raymath.h"
|
|
|
|
|
|
2024-10-20 23:42:38 +02:00
|
|
|
inline bool ViButton(Vec2D<float> *mouse_pos, float x, float y, float radius, Color color){
|
|
|
|
|
Vector2 mp = {mouse_pos->x, mouse_pos->y}; //GetMousePosition(); TODO: Refactor my own vectors to raylib vectors
|
2024-10-15 02:59:26 +02:00
|
|
|
DrawCircle(x,y,radius, color);
|
|
|
|
|
return (Vector2Distance(mp, (Vector2){x,y}) < radius && IsMouseButtonPressed(MOUSE_BUTTON_LEFT));
|
|
|
|
|
}
|