28 #ifndef _LCDGFX_YESNO_H_ 29 #define _LCDGFX_YESNO_H_ 61 template <
typename D>
void show(D &d)
68 d.printFixed(m_rect.
p1.
x + 4, m_rect.
p1.
y + 8, m_text);
97 m_rect.
p2.
x = d.width() - m_rect.
p1.
x - 1;
98 m_rect.
p2.
y = d.height() - m_rect.
p1.
y - 1;
109 template <
typename D>
void locateButtons(D &d)
Class implements YesNo dialog for lcdgfx library.
NanoRect structure describes rectangle area.
NanoPoint p2
right-bottom point of the rectangle area
void updateSize(D &d)
Calculates size for GUI component if it was not set before.
void swapToYes()
Changes selection to Yes.
const NanoPoint center() const
returns center point of NanoRect
lcdint_t y
y position in pixels
bool isYes()
Returns true if yes button is active.
Basic structures of nano gfx library.
LcdGfxYesNo(const char *text, const NanoRect &rect={})
Creates yes/no dialog with the provided text.
void swapToNo()
Changes selection to No Redraw element using show() method.
NanoPoint p1
top-left point of the rectangle area
lcdint_t x
x position in pixels
void show(D &d)
Shows button on the display.