#include <smk/Color.hpp>
#include <smk/Font.hpp>
#include <smk/Text.hpp>
#include <smk/Window.hpp>
#include "asset.hpp"
int main() {
auto window =
smk::Window(640, 640,
"smk/example/text");
const float margin = 20.f;
float step = 0;
window.ExecuteMainLoop([&] {
window.PoolEvents();
auto text =
smk::Text(font,
"The SMK library\ncan display fonts!!!");
text.SetPosition(margin, margin);
window.Draw(text);
text =
smk::Text(font, L
"The SMK library\ncan display fonts!!! ←↑→↓");
text.SetCenter(text.ComputeDimensions() * 0.5f);
text.SetPosition({320.f, 320.f});
text.SetRotation(step++);
window.Draw(text);
window.Display();
});
return EXIT_SUCCESS;
}
A class for displaying text.
A window. You can draw objects on the window.
const glm::vec4 Black
Black.