11 lines
290 B
C
11 lines
290 B
C
|
|
#pragma once
|
||
|
|
|
||
|
|
#include "raylib.h"
|
||
|
|
#include "raymath.h"
|
||
|
|
|
||
|
|
inline bool ViButton(float x, float y, float radius, Color color){
|
||
|
|
Vector2 mp = GetMousePosition();
|
||
|
|
DrawCircle(x,y,radius, color);
|
||
|
|
return (Vector2Distance(mp, (Vector2){x,y}) < radius && IsMouseButtonPressed(MOUSE_BUTTON_LEFT));
|
||
|
|
}
|