From 6a524b46cb9c74c8d1b710c23bbc62bdafd54bb2 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 19 Oct 2021 07:05:31 +0200 Subject: Use uint8_t for color instead of float --- tests/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/main.cpp') 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); -- cgit v1.2.3