#include <iostream>
#include "raylib.h"
#define SCREEN_WIDTH 1280
#define SCREEN_HEIGHT 800
#define SCREEN_NAME "Placeholder Name"
#define BASE_FPS 60
struct DrawBorderedRectangle
{
int REC_WIDTH;
int REC_HEIGHT;
int RECBOR_MULT;
int REC_POSX;
int REC_POSY;
Color REC_COLOR;
Color RECBOR_COLOR;
bool DEFAULT;
};
void DrawHoverableRectangle(const DrawBorderedRectangle& DBR)
{
if (DBR.DEFAULT)
{
Rectangle R =
{
(static_cast<float>(SCREEN_WIDTH) / 0.5f) - (static_cast<float>(DBR.REC_WIDTH) / 0.5f),
(static_cast<float>(SCREEN_HEIGHT) / 0.5f) - (static_cast<float>(DBR.REC_HEIGHT) / 0.5f),
static_cast<float>(DBR.REC_WIDTH),
static_cast<float>(DBR.REC_HEIGHT)
};
DrawRectangleRec(R, DBR.REC_COLOR);
DrawRectangleLinesEx(R, 3.0f, DBR.RECBOR_COLOR);
}
else
{
Rectangle R =
{
static_cast<float>(DBR.REC_POSX ),
static_cast<float>(DBR.REC_POSY ),
static_cast<float>(DBR.REC_WIDTH ),
static_cast<float>(DBR.REC_HEIGHT)
};
DrawRectangleRec(R, DBR.REC_COLOR);
DrawRectangleLinesEx(R, DBR.RECBOR_MULT, DBR.RECBOR_COLOR);
}
}