From 5625f44a0abcb893e775b502ebe2d99a794a2e07 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Mon, 21 Mar 2022 20:35:24 +0100 Subject: [PATCH] Added dimming support to RatingComponent. --- es-core/src/components/RatingComponent.cpp | 7 +++++++ es-core/src/components/RatingComponent.h | 1 + 2 files changed, 8 insertions(+) diff --git a/es-core/src/components/RatingComponent.cpp b/es-core/src/components/RatingComponent.cpp index b7e865d65..a7e001a08 100644 --- a/es-core/src/components/RatingComponent.cpp +++ b/es-core/src/components/RatingComponent.cpp @@ -91,6 +91,13 @@ void RatingComponent::setOpacity(float opacity) updateColors(); } +void RatingComponent::setDimming(float dimming) +{ + mDimming = dimming; + mVertices[0].dimming = mDimming; + mVertices[4].dimming = mDimming; +} + void RatingComponent::setColorShift(unsigned int color) { mColorShift = color; diff --git a/es-core/src/components/RatingComponent.h b/es-core/src/components/RatingComponent.h index 61c038973..a8efac586 100644 --- a/es-core/src/components/RatingComponent.h +++ b/es-core/src/components/RatingComponent.h @@ -33,6 +33,7 @@ public: void onSizeChanged() override; void setOpacity(float opacity) override; + void setDimming(float dimming) override; // Multiply all pixels in the image by this color when rendering. void setColorShift(unsigned int color) override;