ERIS CORE

◆ onTouch()

void AppWren::onTouch ( uint16_t  t_x,
uint16_t  t_y 
)
inlineoverrideprotectedvirtual

class specific onTouch implementation

Parameters
t_x
t_y

Reimplemented from AppBaseClass.

Definition at line 628 of file AppWren.h.

628  {
629  //check if touch point is within the application bounding box
630  if (t_x > x && t_x < (x + w) && t_y > y && t_y < (y + h)){
631  if (!enable_call_forwarding || h_onTouch==0){ //if no script loaded
632  return;
633  } else{
634  wrenEnsureSlots(vm, 4);
635  wrenSetSlotHandle(vm, 0, h_slot0);//App
636  wrenSetSlotDouble(vm, 1, t_x);//param
637  wrenSetSlotDouble(vm, 2, t_y);//param
638  if (!isWrenResultOK(wrenCall(vm,h_onTouch))){
640  };
641  }
642  }
643  };
void releaseWrenHandles()
release any/all Wren embedded call handles
Definition: AppWren.cpp:1651
bool isWrenResultOK(WrenInterpretResult res)
Definition: AppWren.h:543
bool enable_call_forwarding
Definition: AppWren.h:765
WrenVM * vm
Definition: AppWren.h:780
WrenHandle * h_slot0
Definition: AppWren.h:781
WrenHandle * h_onTouch
Definition: AppWren.h:786

References enable_call_forwarding, AppBaseClass::h, h_onTouch, h_slot0, isWrenResultOK(), releaseWrenHandles(), vm, AppBaseClass::w, AppBaseClass::x, and AppBaseClass::y.

+ Here is the call graph for this function: