From 20c46ebd89684e6e284742127006b2cd9c3b440b Mon Sep 17 00:00:00 2001 From: scifiswapnil Date: Sat, 2 May 2020 12:50:58 +0530 Subject: [PATCH] update : Light Indicator Model function to get color --- libstage/model_lightindicator.cc | 5 +++++ libstage/stage.hh | 1 + 2 files changed, 6 insertions(+) diff --git a/libstage/model_lightindicator.cc b/libstage/model_lightindicator.cc index 61316b135..2654baf78 100644 --- a/libstage/model_lightindicator.cc +++ b/libstage/model_lightindicator.cc @@ -16,6 +16,11 @@ void ModelLightIndicator::SetState(bool isOn) m_IsOn = isOn; } +void ModelLightIndicator::SetLightColor(std::string color) +{ + this->SetColor(Color(color)); +} + void ModelLightIndicator::DrawBlocks() { if (m_IsOn) { diff --git a/libstage/stage.hh b/libstage/stage.hh index 92a1d5f9b..4c2135197 100644 --- a/libstage/stage.hh +++ b/libstage/stage.hh @@ -2402,6 +2402,7 @@ public: ~ModelLightIndicator(); void SetState(bool isOn); + void SetLightColor(std::string color); protected: virtual void DrawBlocks();