aboutsummaryrefslogtreecommitdiff
path: root/tests/main.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-10-19 07:05:31 +0200
committerdec05eba <dec05eba@protonmail.com>2021-10-19 07:05:31 +0200
commit6a524b46cb9c74c8d1b710c23bbc62bdafd54bb2 (patch)
tree1dd13bd15b7f2c6de94a318e2d537f6bb7378dff /tests/main.cpp
parent3e081d1669622bbc276b038ddc38ecf0600683c3 (diff)
Use uint8_t for color instead of float
Diffstat (limited to 'tests/main.cpp')
-rw-r--r--tests/main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/main.cpp b/tests/main.cpp
index bddfc3f..3595717 100644
--- a/tests/main.cpp
+++ b/tests/main.cpp
@@ -12,11 +12,11 @@ struct Delegate : public mgl::Window::Delegate {
void draw() override {
mgl::Rectangle rect(window->get_cursor_position().to_vec2f(), { 100.0f, 500.0f });
- rect.set_color({1.0f, 0.0f, 0.0f, 1.0f});
+ rect.set_color({255, 0, 0, 255});
window->draw(rect);
mgl::Sprite sprite(*texture, { 100.0f - 10.0f, 0.0f });
- sprite.set_color({1.0f, 1.0f, 1.0f, 0.5f});
+ sprite.set_color({255, 255, 255, 128});
window->draw(sprite);
mgl::Text text("hello world!\nGood bye world!", { 0.0f, 0.0f }, *font);