Re-enabled "/" keystroke for starting gestures in nearby chatbar incl. properly working Shared Media prims. Fixes FIRE-1990

master
Ansariel 2011-07-08 20:19:40 +02:00
parent 00bccf24a8
commit 7a053e8abf
4 changed files with 17 additions and 2 deletions

View File

@ -74,7 +74,10 @@ LLKeyboardWin32::LLKeyboardWin32()
mTranslateKeyMap[VK_OEM_COMMA] = ',';
mTranslateKeyMap[VK_OEM_MINUS] = '-';
mTranslateKeyMap[VK_OEM_PERIOD] = '.';
mTranslateKeyMap[VK_OEM_2] = '/';//This used to be KEY_PAD_DIVIDE, but that breaks typing into text fields in media prims
// Ansariel: Reverted back. This allows easy starting gestures in chat.
// Shared Media prims borkage is worked around in llviewerkeyboard.cpp,
// start_gesture( EKeystate s )
mTranslateKeyMap[VK_OEM_2] = KEY_PAD_DIVIDE; //'/';//This used to be KEY_PAD_DIVIDE, but that breaks typing into text fields in media prims
mTranslateKeyMap[VK_OEM_3] = '`';
mTranslateKeyMap[VK_OEM_4] = '[';
mTranslateKeyMap[VK_OEM_5] = '\\';

View File

@ -176,7 +176,9 @@ LLAgentCamera::LLAgentCamera() :
mPanLeftKey(0.f),
mPanRightKey(0.f),
mPanInKey(0.f),
mPanOutKey(0.f)
mPanOutKey(0.f),
mPointAtObject(NULL)
{
mFollowCam.setMaxCameraDistantFromSubject( MAX_CAMERA_DISTANCE_FROM_AGENT );
@ -2769,6 +2771,9 @@ void LLAgentCamera::lookAtLastChat()
BOOL LLAgentCamera::setPointAt(EPointAtType target_type, LLViewerObject *object, LLVector3 position)
{
// Ansariel: Remember the current object point pointed at - we might need it later
mPointAtObject = object;
// disallow pointing at attachments and avatars
//this is the editing arm motion
static LLCachedControl<bool> private_pointat(gSavedSettings, "PrivatePointAtTarget", false);

View File

@ -235,6 +235,8 @@ public:
LLPointer<LLHUDEffectLookAt> mLookAt;
LLPointer<LLHUDEffectPointAt> mPointAt;
LLViewerObject* mPointAtObject;
//--------------------------------------------------------------------
// Third person
//--------------------------------------------------------------------

View File

@ -549,6 +549,11 @@ void start_chat( EKeystate s )
void start_gesture( EKeystate s )
{
// Ansariel: If avatar is pointing at something, don't start
// gesture. This works around the bug with Shared
// Media prims.
if (gAgentCamera.mPointAtObject != NULL) return;
LLUICtrl* focus_ctrlp = dynamic_cast<LLUICtrl*>(gFocusMgr.getKeyboardFocus());
if (KEYSTATE_UP == s &&
! (focus_ctrlp && focus_ctrlp->acceptsTextInput()))