ERIS CORE

◆ onTouchDrag()

void ControlSlider::onTouchDrag ( uint16_t  t_x,
uint16_t  t_y 
)
inlineprotectedvirtual

Event handler for touch drag.

Parameters
t_x
t_y

Reimplemented from AppBaseClass.

Definition at line 64 of file ControlSlider.h.

64  {
65  if(is_pressed){
66  value += ((t_x-last_x)/2);
67  if (value>100)value = 100;
68  if (last_x != t_x) parent_node->messageHandler(this,"Changed");
69  last_x = t_x;
70  is_dirty = true;
71  }
72  }
AppBaseClass * parent_node
Definition: AppBaseClass.h:42
virtual void messageHandler(AppBaseClass *sender, const char *message)
receiver method for inter-app string based communication
Definition: AppBaseClass.h:248
uint16_t last_x
Definition: ControlSlider.h:38

References is_dirty, is_pressed, last_x, AppBaseClass::messageHandler(), AppBaseClass::parent_node, and value.

+ Here is the call graph for this function: