mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 15:45: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();
|
||||
}
|
||||
|
||||
std::string RatingComponent::getRatingValue() const
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << mValue * NUM_RATING_STARS;
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
void RatingComponent::setOpacity(unsigned char opacity)
|
||||
{
|
||||
mOpacity = opacity;
|
||||
|
|
|
@ -23,6 +23,7 @@ public:
|
|||
RatingComponent(bool colorizeChanges = false);
|
||||
|
||||
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.
|
||||
void setValue(const std::string& value) override;
|
||||
|
||||
|
|
Loading…
Reference in a new issue