def registerPauseClick(a, cont):
    pauseBtn = cont.getChildAt([(app.ui.width - 100), 0])
    if (a.thread.stop or a.thread.firstRun):
        return
    if a.thread.pause:
        a.activate()
        pauseBtn.textComponent.text = 'Pause'
        pauseBtn.refresh()
    else:
        a.deactivate(True)
        pauseBtn.textComponent.text = 'Resume'
        pauseBtn.refresh()
def registerPauseClick(a, cont):
    pauseBtn = cont.getChildAt([(app.ui.width - 100), 0])
    if (a.thread.stop or a.thread.firstRun):
        return
    if a.thread.pause:
        a.activate()
        pauseBtn.textComponent.text = 'Pause'
        pauseBtn.refresh()
    else:
        a.deactivate(True)
        pauseBtn.textComponent.text = 'Resume'
        pauseBtn.refresh()