MCPcopy Create free account
hub / github.com/axmolengine/axmol / onTouchBegan

Method onTouchBegan

extensions/GUI/src/GUI/ControlExtension/ControlStepper.cpp:281–299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

279}
280
281bool ControlStepper::onTouchBegan(Touch* pTouch, Event* /*pEvent*/)
282{
283 if (!isTouchInside(pTouch) || !isEnabled() || !isVisible())
284 {
285 return false;
286 }
287
288 Vec2 location = this->getTouchLocation(pTouch);
289 this->updateLayoutUsingTouchLocation(location);
290
291 _touchInsideFlag = true;
292
293 if (_autorepeat)
294 {
295 this->startAutorepeat();
296 }
297
298 return true;
299}
300
301void ControlStepper::onTouchMoved(Touch* pTouch, Event* /*pEvent*/)
302{

Callers

nothing calls this directly

Calls 5

startAutorepeatMethod · 0.95
getTouchLocationMethod · 0.80
isEnabledFunction · 0.50
isVisibleFunction · 0.50

Tested by

no test coverage detected