Merge pull request #530 from mikeysklar/text-getters

Add getters for text size, color and font
This commit is contained in:
Mikey Sklar authored and GitHub committed 2026-10-23 19:28:19 -07:00
commit 1cb8122cec
1 file changed
+40
+40
View File
@@ -137,6 +137,30 @@ public:
void setTextSize(uint8_t sx, uint8_t sy); void setTextSize(uint8_t sx, uint8_t sy);
void setFont(const GFXfont *f = NULL); void setFont(const GFXfont *f = NULL);
/**********************************************************************/
/*!
@brief Get GFX font
@returns GFX font
*/
/**********************************************************************/
GFXfont *getFont() const { return gfxFont; }
/**********************************************************************/
/*!
@brief Get text size multiplier x
@returns text size multiplier x
*/
/**********************************************************************/
uint8_t getTextSizeX() const { return textsize_x; }
/**********************************************************************/
/*!
@brief Get text size multiplier y
@returns text size multiplier y
*/
/**********************************************************************/
uint8_t getTextSizeY() const { return textsize_y; }
/**********************************************************************/ /**********************************************************************/
/*! /*!
@brief Set text cursor location @brief Set text cursor location
@@ -171,6 +195,22 @@ public:
textbgcolor = bg; textbgcolor = bg;
} }
/**********************************************************************/
/*!
@brief Get text color
@returns text color
*/
/**********************************************************************/
uint16_t getTextColor() const { return textcolor; }
/**********************************************************************/
/*!
@brief Get text background color
@returns text background color
*/
/**********************************************************************/
uint16_t getTextBgColor() const { return textbgcolor; }
/**********************************************************************/ /**********************************************************************/
/*! /*!
@brief Set whether text that is too long for the screen width should @brief Set whether text that is too long for the screen width should