Fix precompiled headers

Added edge detection (if it works :/)
This commit is contained in:
Bram Verhulst
2024-04-06 01:23:24 +02:00
parent 71d364d9d8
commit 9def986c83
25 changed files with 932 additions and 593 deletions

17
Engine/Text.cpp Normal file
View File

@@ -0,0 +1,17 @@
#include "Text.h"
#include <iostream>
Text::Text(const std::string& text, const std::string& fontPath, int size, const Color4f& color): m_Text(text), m_FontPath(fontPath), m_Color(color) {
m_Texture = new Texture(text, fontPath, size, color);
m_IsCreatedOk = m_Texture->IsCreationOk();
if(!m_IsCreatedOk) {
std::cout << "Error creating text texture, Text: " << text << std::endl;
}
}
Text::~Text() {
if(m_IsCreatedOk && m_Texture->IsCreationOk()) {
}
}
void Text::Draw(const Point2f& pos) const {
m_Texture->Draw(pos);
}