This commit is contained in:
Bram Verhulst
2024-06-09 22:03:29 +02:00
parent d7389411f5
commit 5f1dcd5788
76 changed files with 1532 additions and 385 deletions

View File

@@ -58,3 +58,6 @@ void SoundEffect::PauseAll() {
void SoundEffect::ResumeAll() {
Mix_Resume(-1);
}
bool SoundEffect::IsPlaying() const {
return Mix_Playing(m_Channel);
}

View File

@@ -20,6 +20,8 @@ public:
static void PauseAll( );
static void ResumeAll( );
bool IsPlaying() const;
private:
Mix_Chunk* m_pMixChunk;
int m_Channel;

View File

@@ -31,3 +31,6 @@ void Text::ChangeText(const std::string& text) {
std::cout << "This is wierd??: " << m_Text << std::endl;
}
}
std::string Text::GetText() {
return m_Text;
}

View File

@@ -11,11 +11,15 @@ public:
Text() = default;
~Text();
Text(const Text& other) = delete;
Text(Text&& other) = delete;
Text& operator=(const Text& other) = delete;
Text& operator=(Text&& other) = delete;
void Draw(const Vector2f& pos) const;
void ChangeText(const std::string& text);
std::string GetText();
private:
std::string m_Text;

View File

@@ -15,4 +15,6 @@ namespace Colors
const Color4f CYAN{ 0.0f, 1.0f, 1.0f, 1.0f };
const Color4f PINK{ 1.0f, 0.0f, 0.5f, 1.0f };
const Color4f ORANGE{ 1.0f, 0.5f, 0.0f, 1.0f };
const Color4f GRAY{ 0.5f, 0.5f, 0.5f, 1.0f};
const Color4f LIGHTGRAY{ 0.8f, 0.8f, 0.8f, 1.0f};
}