diff --git a/OLEDDisplayUi.cpp b/OLEDDisplayUi.cpp index 5acc6eedcca015922d1e490c33e2e0565937e0e9..e78744299f6dbd0f6ef7155d6cef43208a0aa886 100644 --- a/OLEDDisplayUi.cpp +++ b/OLEDDisplayUi.cpp @@ -76,6 +76,14 @@ void OLEDDisplayUi::disableIndicator(){ this->state.isIndicatorDrawen = false; } +void OLEDDisplayUi::enableAllIndicators(){ + this->shouldDrawIndicators = true; +} + +void OLEDDisplayUi::disableAllIndicators(){ + this->shouldDrawIndicators = false; +} + void OLEDDisplayUi::setIndicatorPosition(IndicatorPosition pos) { this->indicatorPosition = pos; } @@ -220,7 +228,9 @@ void OLEDDisplayUi::tick() { this->display->clear(); this->drawFrame(); - this->drawIndicator(); + if (shouldDrawIndicators) { + this->drawIndicator(); + } this->drawOverlays(); this->display->display(); } diff --git a/OLEDDisplayUi.h b/OLEDDisplayUi.h index 77c46c75985471c62dde0f798cfece07315c4ed3..617346a3a2ede21c9f09a19a279aa89d4cbe8387 100644 --- a/OLEDDisplayUi.h +++ b/OLEDDisplayUi.h @@ -81,7 +81,7 @@ struct OLEDDisplayUiState { bool isIndicatorDrawen = true; // Normal = 1, Inverse = -1; - int8_t frameTransitionDirection = 1; + int8_t frameTransitionDirection = 1; bool manuelControll = false; @@ -109,6 +109,8 @@ class OLEDDisplayUi { const char* activeSymbol = ANIMATION_activeSymbol; const char* inactiveSymbol = ANIMATION_inactiveSymbol; + bool shouldDrawIndicators = true; + // Values for the Frames AnimationDirection frameAnimationDirection = SLIDE_RIGHT; @@ -215,6 +217,16 @@ class OLEDDisplayUi { */ void disableIndicator(); + /** + * Enable drawing of indicators + */ + void enableAllIndicators(); + + /** + * Disable draw of indicators. + */ + void disableAllIndicators(); + /** * Set the position of the indicator bar. */ diff --git a/README.md b/README.md index 6e60fc63c31e71c3a3b4cee911bb0ee8f9354350..e1e6a1d30e5a88d5ed68b1ae205402a48c48f0b2 100644 --- a/README.md +++ b/README.md @@ -273,6 +273,16 @@ void enableIndicator(); */ void disableIndicator(); +/** + * Enable drawing of indicators + */ +void enableAllIndicator(); + +/** + * Disable drawing of indicators. + */ +void disableAllIndicator(); + /** * Set the position of the indicator bar. */