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

Method onTouchEnded

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

Source from the content-addressed store, hash-verified

332}
333
334void ControlStepper::onTouchEnded(Touch* pTouch, Event* /*pEvent*/)
335{
336 _minusSprite->setColor(Color3B::WHITE);
337 _plusSprite->setColor(Color3B::WHITE);
338
339 if (_autorepeat)
340 {
341 this->stopAutorepeat();
342 }
343
344 if (this->isTouchInside(pTouch))
345 {
346 Vec2 location = this->getTouchLocation(pTouch);
347
348 this->setValue(_value +
349 ((location.x < _minusSprite->getContentSize().width) ? (0.0 - _stepValue) : _stepValue));
350 }
351}
352
353NS_AX_EXT_END

Callers

nothing calls this directly

Calls 6

stopAutorepeatMethod · 0.95
setValueMethod · 0.95
getTouchLocationMethod · 0.80
setColorMethod · 0.45
isTouchInsideMethod · 0.45
getContentSizeMethod · 0.45

Tested by

no test coverage detected