JM9 XRCU Board 0.2.0a
Libraries API Reference
Loading...
Searching...
No Matches
Adafruit_GFX_Button Class Reference

A simple drawn button UI element. More...

#include <Adafruit_GFX.h>

Public Member Functions

void initButton (Adafruit_GFX *gfx, int16_t x, int16_t y, uint16_t w, uint16_t h, uint16_t outline, uint16_t fill, uint16_t textcolor, char *label, uint8_t textsize)
 
void initButton (Adafruit_GFX *gfx, int16_t x, int16_t y, uint16_t w, uint16_t h, uint16_t outline, uint16_t fill, uint16_t textcolor, char *label, uint8_t textsize_x, uint8_t textsize_y)
 
void initButtonUL (Adafruit_GFX *gfx, int16_t x1, int16_t y1, uint16_t w, uint16_t h, uint16_t outline, uint16_t fill, uint16_t textcolor, char *label, uint8_t textsize)
 
void initButtonUL (Adafruit_GFX *gfx, int16_t x1, int16_t y1, uint16_t w, uint16_t h, uint16_t outline, uint16_t fill, uint16_t textcolor, char *label, uint8_t textsize_x, uint8_t textsize_y)
 
void drawButton (bool inverted=false)
 
bool contains (int16_t x, int16_t y)
 
void press (bool p)
 Sets button state, should be done by some touch function.
 
bool justPressed ()
 
bool justReleased ()
 
bool isPressed (void)
 Query whether the button is currently pressed.
 

Detailed Description

A simple drawn button UI element.

Member Function Documentation

◆ isPressed()

bool Adafruit_GFX_Button::isPressed ( void )
inline

Query whether the button is currently pressed.

Returns
True if pressed

◆ press()

void Adafruit_GFX_Button::press ( bool p)
inline

Sets button state, should be done by some touch function.

Parameters
pTrue for pressed, false for not.

The documentation for this class was generated from the following file: