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

Method onTouchMoved

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

Source from the content-addressed store, hash-verified

299}
300
301void ControlStepper::onTouchMoved(Touch* pTouch, Event* /*pEvent*/)
302{
303 if (this->isTouchInside(pTouch))
304 {
305 Vec2 location = this->getTouchLocation(pTouch);
306 this->updateLayoutUsingTouchLocation(location);
307
308 if (!_touchInsideFlag)
309 {
310 _touchInsideFlag = true;
311
312 if (_autorepeat)
313 {
314 this->startAutorepeat();
315 }
316 }
317 }
318 else
319 {
320 _touchInsideFlag = false;
321
322 _touchedPart = Part::NONE;
323
324 _minusSprite->setColor(Color3B::WHITE);
325 _plusSprite->setColor(Color3B::WHITE);
326
327 if (_autorepeat)
328 {
329 this->stopAutorepeat();
330 }
331 }
332}
333
334void ControlStepper::onTouchEnded(Touch* pTouch, Event* /*pEvent*/)
335{

Callers

nothing calls this directly

Calls 6

startAutorepeatMethod · 0.95
stopAutorepeatMethod · 0.95
getTouchLocationMethod · 0.80
isTouchInsideMethod · 0.45
setColorMethod · 0.45

Tested by

no test coverage detected