BOOL LLAlertDialog::handleKeyHere(KEY key, MASK mask ) { if( KEY_RETURN == key && mask == MASK_NONE ) { LLModalDialog::handleKeyHere( key, mask ); return TRUE; } else if (KEY_RIGHT == key) { focusNextItem(FALSE); return TRUE; } else if (KEY_LEFT == key) { focusPrevItem(FALSE); return TRUE; } else if (KEY_TAB == key && mask == MASK_NONE) { focusNextItem(FALSE); return TRUE; } else if (KEY_TAB == key && mask == MASK_SHIFT) { focusPrevItem(FALSE); return TRUE; } else { return LLModalDialog::handleKeyHere( key, mask ); } }
BOOL LLAlertDialog::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent ) { if( KEY_RETURN == key && mask == MASK_NONE ) { // Warning: handleKeyHere may result in the default button // being committed, which will destroy this object. // Everything works, but the call stack will pass through // the very end of functions that belong to deleted objects. // Should find a less fragile way to do this. LLModalDialog::handleKeyHere( key, mask , called_from_parent ); return TRUE; } else if (KEY_RIGHT == key) { focusNextItem(FALSE); return TRUE; } else if (KEY_LEFT == key) { focusPrevItem(FALSE); return TRUE; } else if (KEY_TAB == key && mask == MASK_NONE) { focusNextItem(FALSE); return TRUE; } else if (KEY_TAB == key && mask == MASK_SHIFT) { focusPrevItem(FALSE); return TRUE; } else { return LLModalDialog::handleKeyHere( key, mask , called_from_parent ); } }