#include <cmath>
#include <smk/Audio.hpp>
#include <smk/Color.hpp>
#include <smk/Font.hpp>
#include <smk/Input.hpp>
#include <smk/Sound.hpp>
#include <smk/SoundBuffer.hpp>
#include <smk/Text.hpp>
#include <smk/Window.hpp>
#include "asset.hpp"
int main() {
text.SetPosition(10, 10);
window.ExecuteMainLoop([&] {
window.PoolEvents();
if (window.input().IsCursorReleased()) {
if (sound.IsPlaying()) {
sound.Stop();
} else {
sound.Play();
}
}
window.Draw(text);
window.Display();
});
return EXIT_SUCCESS;
}
A sound file loaded in memory.
Represent a sound being played.
A class for displaying text.
A window. You can draw objects on the window.
const glm::vec4 Black
Black.
const glm::vec4 White
White.