boolean TouchKeyboard::GetKeyboardCalibration(TouchScreen &screen, Rect &bounds, CalibrationPrompt &prompt) { Point lb, tr; prompt.PromptUser(leftBottom); lb = screen.getPressAndRelease(true); prompt.PromptUser(rightTop); tr = screen.getPressAndRelease(true); if (lb.x < tr.x && lb.y < tr.y) { bounds.left = lb.x; bounds.bottom = lb.y; bounds.right = tr.x; bounds.top = tr.y; return true; } else return false; }