You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just a quick suggestion, could we add setCursorX(uint16_t x) and setCursorY(uint16_t y) to Adafruit_GFX.h?
Often I find myself having to get the cursor X or Y position when populating a screen with text, which looks a bit like:
uint16_t RH_text_x_pos = 55;
tft.print("Some text");
tft.setCursor(RH_text_x_pos , tft.getCursorY());
tft.println("RH text at a consistant X co-ord");
if we had the following added to Adafruit_GFX.h then it would clean up the main code a bit... Just a suggestion of course :-)
Line 126
//
/! @brief Set text cursor location @param x X coordinate in pixels @param y Y coordinate in pixels /
//
void setCursor(int16_t x, int16_t y) {
cursor_x = x;
cursor_y = y;
}
Just a quick suggestion, could we add setCursorX(uint16_t x) and setCursorY(uint16_t y) to Adafruit_GFX.h?
Often I find myself having to get the cursor X or Y position when populating a screen with text, which looks a bit like:
uint16_t RH_text_x_pos = 55;
tft.print("Some text");
tft.setCursor(RH_text_x_pos , tft.getCursorY());
tft.println("RH text at a consistant X co-ord");
if we had the following added to Adafruit_GFX.h then it would clean up the main code a bit... Just a suggestion of course :-)
Line 126
//
/!
@brief Set text cursor location
@param x X coordinate in pixels
@param y Y coordinate in pixels
/
//
void setCursor(int16_t x, int16_t y) {
cursor_x = x;
cursor_y = y;
}
// Custom cursor functions...
void setCursorX(int16_t x) {
cursor_x = x;
}
void setCursorY(int16_t y) {
cursor_y = y;
}
The text was updated successfully, but these errors were encountered: