mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-02-16 20:15:38 +00:00
Added a new getRatingValue function to RatingComponent.
This commit is contained in:
parent
487422454e
commit
a147c87cea
|
@ -75,6 +75,13 @@ std::string RatingComponent::getValue() const
|
||||||
return ss.str();
|
return ss.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string RatingComponent::getRatingValue() const
|
||||||
|
{
|
||||||
|
std::stringstream ss;
|
||||||
|
ss << mValue * NUM_RATING_STARS;
|
||||||
|
return ss.str();
|
||||||
|
}
|
||||||
|
|
||||||
void RatingComponent::setOpacity(unsigned char opacity)
|
void RatingComponent::setOpacity(unsigned char opacity)
|
||||||
{
|
{
|
||||||
mOpacity = opacity;
|
mOpacity = opacity;
|
||||||
|
|
|
@ -23,6 +23,7 @@ public:
|
||||||
RatingComponent(bool colorizeChanges = false);
|
RatingComponent(bool colorizeChanges = false);
|
||||||
|
|
||||||
std::string getValue() const override;
|
std::string getValue() const override;
|
||||||
|
std::string getRatingValue() const;
|
||||||
// Should be a normalized float (in the range [0..1]) - if it's not, it will be clamped.
|
// Should be a normalized float (in the range [0..1]) - if it's not, it will be clamped.
|
||||||
void setValue(const std::string& value) override;
|
void setValue(const std::string& value) override;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue