Commit 6c993f8f authored by Bodmer's avatar Bodmer

Add getCursorX() and getCursorY() functions

As requested in Issue #79

Function names are compatible with Adafruit_GFX

Also trimmed out duplicate keywords
parent 26c4cac3
......@@ -1525,6 +1525,25 @@ void TFT_eSPI::setCursor(int16_t x, int16_t y, uint8_t font)
}
/***************************************************************************************
** Function name: getCursorX
** Description: Get the text cursor x position
***************************************************************************************/
int16_t TFT_eSPI::getCursorX(void)
{
return cursor_x;
}
/***************************************************************************************
** Function name: getCursorY
** Description: Get the text cursor y position
***************************************************************************************/
int16_t TFT_eSPI::getCursorY(void)
{
return cursor_y;
}
/***************************************************************************************
** Function name: setTextSize
** Description: Set the text size multiplier
......
......@@ -429,6 +429,9 @@ class TFT_eSPI : public Print {
getTextDatum(void),
color332(uint16_t color565); // Convert 16 bit colour to 8 bits
int16_t getCursorX(void),
getCursorY(void);
uint16_t fontsLoaded(void),
color565(uint8_t r, uint8_t g, uint8_t b);
......
......@@ -7,8 +7,6 @@ setAddrWindow KEYWORD2
setWindow KEYWORD2
readAddrWindow KEYWORD2
pushColor KEYWORD2
pushColor KEYWORD2
pushColors KEYWORD2
pushColors KEYWORD2
fillScreen KEYWORD2
writeBegin KEYWORD2
......@@ -32,8 +30,8 @@ drawTriangle KEYWORD2
fillTriangle KEYWORD2
drawBitmap KEYWORD2
setCursor KEYWORD2
setCursor KEYWORD2
setTextColor KEYWORD2
getCursorX KEYWORD2
getCursorY KEYWORD2
setTextColor KEYWORD2
setTextSize KEYWORD2
setTextFont KEYWORD2
......@@ -59,7 +57,6 @@ getTextDatum KEYWORD2
fontsLoaded KEYWORD2
color565 KEYWORD2
color332 KEYWORD2
drawChar KEYWORD2
drawNumber KEYWORD2
drawFloat KEYWORD2
drawString KEYWORD2
......@@ -97,7 +94,6 @@ createSprite KEYWORD2
setColorDepth KEYWORD2
deleteSprite KEYWORD2
fillSprite KEYWORD2
setWindow KEYWORD2
pushBitmap KEYWORD2
pushSprite KEYWORD2
setScrollRect KEYWORD2
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment