void CGUIDialogKeyboardGeneric::FrameMove() { // reset the hide state of the label when the remote // sms style input times out if (m_lastRemoteClickTime && m_lastRemoteClickTime + REMOTE_SMS_DELAY < CTimeUtils::GetFrameTime()) { // finished inputting a sms style character - turn off our shift and symbol states ResetShiftAndSymbols(); } CGUIDialog::FrameMove(); }
void CGUIDialogKeyboard::Render() { // reset the hide state of the label when the remote // sms style input times out if (m_lastRemoteClickTime && m_lastRemoteClickTime + REMOTE_SMS_DELAY < timeGetTime()) { // finished inputting a sms style character - turn off our shift and symbol states ResetShiftAndSymbols(); } if (m_lastSearchUpdate && m_lastSearchUpdate + SEARCH_DELAY < timeGetTime()) UpdateLabel(); CGUIDialog::Render(); }
void CGUIDialogKeyboardGeneric::OnRemoteNumberClick(int key) { unsigned int now = CTimeUtils::GetFrameTime(); if (m_lastRemoteClickTime) { // a remote key has been pressed if (key != m_lastRemoteKeyClicked || m_lastRemoteClickTime + REMOTE_SMS_DELAY < now) { // a different key was clicked than last time, or we have timed out m_lastRemoteKeyClicked = key; m_indexInSeries = 0; // reset our shift and symbol states, and update our label to ensure the search filter is sent ResetShiftAndSymbols(); UpdateLabel(); } else { // same key as last time within the appropriate time period m_indexInSeries++; Backspace(); } } else { // key is pressed for the first time m_lastRemoteKeyClicked = key; m_indexInSeries = 0; } int arrayIndex = key - REMOTE_0; m_indexInSeries = m_indexInSeries % strlen(s_charsSeries[arrayIndex]); m_lastRemoteClickTime = now; // Select the character that will be pressed const char* characterPressed = s_charsSeries[arrayIndex]; characterPressed += m_indexInSeries; // use caps where appropriate char ch = *characterPressed; bool caps = (m_keyType == CAPS && !m_bShift) || (m_keyType == LOWER && m_bShift); if (!caps && *characterPressed >= 'A' && *characterPressed <= 'Z') ch += 32; Character(ch); }