SwitchGame/source/EngineFrame/Actor/Debug_Actor.h

32 lines
716 B
C++

#pragma once
#include "EngineFrame/Actor/Actor.h"
#include "EngineFrame/Component/Text.h"
#include <SDL_ttf.h>
#include <cstdint>
class Debug_Actor : public Actor
{
private:
TTF_Font *m_debugFont;
RefPtr<Text> FPS_Text;
RefPtr<Text> DT_Text;
public:
Debug_Actor();
~Debug_Actor() override;
void Update(float deltaTime) override;
void Render(float deltaTime) override;
uint32_t FPS = 0;
SDL_Color bgColor = {0, 0, 0, 90};
int cornerRadius = 4;
int padding = 12;
double M_PI = 3.14159265358979323846;
double M_PI_2 = 1.57079632679489661923;
private:
void DrawRoundedRect(SDL_Renderer *renderer, int x, int y, int w, int h, int radius, SDL_Color color);
};