ProtoTank/Engine/Graphics/DebugUI.cpp
2024-09-14 16:36:15 +02:00

16 lines
498 B
C++

#include "DebugUI.hpp"
#include "../Misc/Fonts.hpp"
DebugUI::DebugUI() {
gDbgFont.loadFromMemory(&_afont_monofonto_rg, FONTSIZE_MONOFONTO_RG);
gDbgText.setFont(gDbgFont);
gDbgText.setCharacterSize(14);
gDbgText.setPosition(0, 0);
gDbgText.setFillColor(sf::Color::White);
}
void DebugUI::UpdateDebugData(std::shared_ptr<sf::RenderWindow> context) {
gDbgText.setString("CPU Usage: XXX.X % (ticks: XXXX.X ms)\nFPS: XXX\nRAM Usage: XXXX.X MB");
context->draw(gDbgText);
}