ERIS CORE

◆ onTouch()

void FLASHMEM ControlButton::onTouch ( uint16_t  t_x,
uint16_t  t_y 
)
inlineoverrideprotectedvirtual

Event handler called on touch.

Parameters
t_x
t_y

Reimplemented from AppBaseClass.

Definition at line 119 of file ControlButton.h.

119  {
120  //Serial.println("MyButton:onTouch");
121  //check if touch point is within the application bounding box
122  if ((t_x > x && t_x < x + w) && t_y > y && t_y < (y + h)){
123  //Serial.println("MyButton:onTouch Button Pressed");
124  is_pressed = true;
125  show_active = true;
126  is_dirty = true;
127  }
128  };

References AppBaseClass::h, is_dirty, is_pressed, show_active, AppBaseClass::w, AppBaseClass::x, and AppBaseClass::y.