Skip to content

Commit

Permalink
Use Rgb instead of Color for Label ctor
Browse files Browse the repository at this point in the history
  • Loading branch information
jhasse committed Nov 12, 2024
1 parent 3d3b722 commit 32c7bab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/jngl/Label.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace jngl {

Label::Label(const std::string& str, Font& font, const Color color, const jngl::Vec2 position)
Label::Label(const std::string& str, Font& font, const Rgb color, const jngl::Vec2 position)
: Widget(position), text(font, str), color(color) {
text.setCenter(Vec2(0, 0));
}
Expand Down
8 changes: 4 additions & 4 deletions src/jngl/Label.hpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Copyright 2020-2022 Jan Niklas Hasse <[email protected]>
// Copyright 2020-2024 Jan Niklas Hasse <[email protected]>
// For conditions of distribution and use, see copyright notice in LICENSE.txt
/// Contains jngl::Label class
/// @file
#pragma once

#include "Color.hpp"
#include "Rgb.hpp"
#include "TextLine.hpp"
#include "Widget.hpp"
#include "text.hpp"
Expand All @@ -14,7 +14,7 @@ namespace jngl {
/// Simple Widget displaying a line of text
class Label : public Widget {
public:
explicit Label(const std::string& str, Font&, Color, Vec2 position);
explicit Label(const std::string& str, Font&, Rgb, Vec2 position);

void drawSelf(jngl::Mat3) const override;

Expand All @@ -32,7 +32,7 @@ class Label : public Widget {

private:
jngl::TextLine text;
jngl::Color color;
jngl::Rgb color;
};

} // namespace jngl

0 comments on commit 32c7bab

Please sign in to comment.