public boolean action(Event event, Object obj)
{
if(event.target == m_button)
{
totalDone = 0;
for(int i = 0; i < senPerScreen; i++)
if(m_canvas[i].sentenceDone)
totalDone++;
if(totalDone != 10)
{
Message.showNotFinishedMessage = true;
msg_canvas.repaint();
} else
{
if(!finished)
{
for(int j = 0; j < senPerScreen; j++)
if(m_canvas[j].IamRight())
score++;
}
if(screenNumber == 5 && score < 40 || screenNumber == 3 && score < 16 || screenNumber == 10)
{
Message.showCongratsMessage = true;
msg_canvas.repaint();
finished = true;
m_ansWin.hide();
m_ansWin.show();
} else
{
for(int k = 0; k < senPerScreen; k++)
{
m_canvas[k].Changetext(m_sentences[k + 10 * screenNumber], k + 10 * screenNumber);
m_canvas[k].repaint();
}
screenNumber++;
Message.showCongratsMessage = true;
msg_canvas.repaint();
}
}
return true;
} else
{
return false;
}
}