diff options
author | Josh Bell <josh@lindenlab.com> | 2007-01-09 20:19:31 +0000 |
---|---|---|
committer | Josh Bell <josh@lindenlab.com> | 2007-01-09 20:19:31 +0000 |
commit | 8c344f4da02105428c5933501d028a4a8908a657 (patch) | |
tree | 1463f67247c48a7420620917aa7fde5d6a810820 /indra/newview | |
parent | 8534623734e64387736ddb76683939104d796ade (diff) |
svn merge -r 56560:56599 svn+ssh://svn.lindenlab.com/svn/linden/branches/maintenance
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/app_settings/keys.ini | 7 | ||||
-rw-r--r-- | indra/newview/llchatbar.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llfloatercolorpicker.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llimpanel.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llinventorymodel.cpp | 12 | ||||
-rw-r--r-- | indra/newview/llmanip.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llpreview.cpp | 10 | ||||
-rw-r--r-- | indra/newview/lltexturectrl.cpp | 8 | ||||
-rw-r--r-- | indra/newview/llviewermenu.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 28 |
10 files changed, 65 insertions, 15 deletions
diff --git a/indra/newview/app_settings/keys.ini b/indra/newview/app_settings/keys.ini index f6232abb47..b7fc6f9286 100644 --- a/indra/newview/app_settings/keys.ini +++ b/indra/newview/app_settings/keys.ini @@ -129,6 +129,13 @@ THIRD_PERSON DOWN ALT move_backward THIRD_PERSON PGUP ALT spin_over THIRD_PERSON PGDN ALT spin_under +THIRD_PERSON A ALT spin_around_cw +THIRD_PERSON D ALT spin_around_ccw +THIRD_PERSON W ALT move_forward +THIRD_PERSON S ALT move_backward +THIRD_PERSON E ALT spin_over +THIRD_PERSON C ALT spin_under + THIRD_PERSON PAD_LEFT ALT spin_around_cw THIRD_PERSON PAD_RIGHT ALT spin_around_ccw THIRD_PERSON PAD_UP ALT move_forward diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp index 208a14a6c6..e958bd2152 100644 --- a/indra/newview/llchatbar.cpp +++ b/indra/newview/llchatbar.cpp @@ -95,6 +95,7 @@ LLChatBar::LLChatBar(const std::string& name, const LLRect& rect) mInputEditor->setFocusLostCallback(&onInputEditorFocusLost); mInputEditor->setFocusReceivedCallback( &onInputEditorGainFocus ); mInputEditor->setCommitOnFocusLost( FALSE ); + mInputEditor->setRevertOnEsc( FALSE ); mInputEditor->setIgnoreTab(TRUE); mInputEditor->setPassDelete(TRUE); } diff --git a/indra/newview/llfloatercolorpicker.cpp b/indra/newview/llfloatercolorpicker.cpp index 181a66c2ef..59147c54f8 100644 --- a/indra/newview/llfloatercolorpicker.cpp +++ b/indra/newview/llfloatercolorpicker.cpp @@ -42,7 +42,8 @@ #include "lldraghandle.h" const F32 CONTEXT_CONE_IN_ALPHA = 0.0f; -const F32 CONTEXT_CONE_OUT_ALPHA = 0.35f; +const F32 CONTEXT_CONE_OUT_ALPHA = 1.f; +const F32 CONTEXT_FADE_TIME = 0.08f; ////////////////////////////////////////////////////////////////////////////// // @@ -607,11 +608,11 @@ void LLFloaterColorPicker::draw() if (gFocusMgr.childHasMouseCapture(mDragHandle)) { - mContextConeOpacity = lerp(mContextConeOpacity, 1.f, LLCriticalDamp::getInterpolant(0.1f)); + mContextConeOpacity = lerp(mContextConeOpacity, gSavedSettings.getF32("PickerContextOpacity"), LLCriticalDamp::getInterpolant(CONTEXT_FADE_TIME)); } else { - mContextConeOpacity = lerp(mContextConeOpacity, 0.f, LLCriticalDamp::getInterpolant(0.2f)); + mContextConeOpacity = lerp(mContextConeOpacity, 0.f, LLCriticalDamp::getInterpolant(CONTEXT_FADE_TIME)); } mPipetteBtn->setEnabled(gToolMgr != NULL); diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 718ea894aa..865de53512 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -110,6 +110,7 @@ BOOL LLFloaterIMPanel::postBuild() mInputEditor->setKeystrokeCallback( onInputEditorKeystroke ); mInputEditor->setCallbackUserData(this); mInputEditor->setCommitOnFocusLost( FALSE ); + mInputEditor->setRevertOnEsc( FALSE ); LLButton* profile_btn = LLUICtrlFactory::getButtonByName(this, "profile_btn"); profile_btn->setClickedCallback(&LLFloaterIMPanel::onClickProfile, this); diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 509f040c34..f1c4f0d918 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -2340,19 +2340,25 @@ bool LLInventoryModel::messageUpdateCore(LLMessageSystem* msg, bool account, boo open_notecard( lastitem->getUUID(), LLString("Note: ") + lastitem->getName(), - show_keep_discard); + show_keep_discard, + LLUUID::null, + FALSE); break; case LLAssetType::AT_LANDMARK: open_landmark( lastitem->getUUID(), LLString(" ") + lastitem->getName(), - show_keep_discard); + show_keep_discard, + LLUUID::null, + FALSE); break; case LLAssetType::AT_TEXTURE: open_texture( lastitem->getUUID(), LLString("Texture: ") + lastitem->getName(), - show_keep_discard); + show_keep_discard, + LLUUID::null, + FALSE); break; default: break; diff --git a/indra/newview/llmanip.cpp b/indra/newview/llmanip.cpp index 74c7ae6c18..57d34f672b 100644 --- a/indra/newview/llmanip.cpp +++ b/indra/newview/llmanip.cpp @@ -88,7 +88,9 @@ void LLManip::getManipNormal(LLViewerObject* object, EManipPart manip, LLVector3 LLVector3 arrow_axis; getManipAxis(object, manip, arrow_axis); - LLVector3 cross = arrow_axis % gCamera->getAtAxis(); + LLVector3 origin_dir = grid_origin - gCamera->getOrigin(); + origin_dir.normVec(); + LLVector3 cross = arrow_axis % origin_dir; normal = cross % arrow_axis; normal.normVec(); } diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp index 5cc2d2e39f..82974da634 100644 --- a/indra/newview/llpreview.cpp +++ b/indra/newview/llpreview.cpp @@ -157,6 +157,16 @@ void LLPreview::onCommit() LLViewerInventoryItem* item = getItem(); if(item) { + if (!item->isComplete()) + { + // We are attempting to save an item that was never loaded + llwarns << "LLPreview::onCommit() called with mIsComplete == FALSE" + << " Type: " << item->getType() + << " ID: " << item->getUUID() + << llendl; + return; + } + LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item); BOOL has_sale_info = FALSE; LLSaleInfo sale_info; diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 106bfd0095..cb7679557e 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -67,8 +67,8 @@ static const S32 FOOTER_HEIGHT = 100; static const S32 BORDER_PAD = HPAD; static const S32 TEXTURE_INVENTORY_PADDING = 30; static const F32 CONTEXT_CONE_IN_ALPHA = 0.0f; -static const F32 CONTEXT_CONE_OUT_ALPHA = 0.35f; - +static const F32 CONTEXT_CONE_OUT_ALPHA = 1.f; +static const F32 CONTEXT_FADE_TIME = 0.08f; //static const char CURRENT_IMAGE_NAME[] = "Current Texture"; //static const char WHITE_IMAGE_NAME[] = "Blank Texture"; @@ -437,11 +437,11 @@ void LLFloaterTexturePicker::draw() if (gFocusMgr.childHasMouseCapture(mDragHandle)) { - mContextConeOpacity = lerp(mContextConeOpacity, 1.f, LLCriticalDamp::getInterpolant(0.1f)); + mContextConeOpacity = lerp(mContextConeOpacity, gSavedSettings.getF32("PickerContextOpacity"), LLCriticalDamp::getInterpolant(CONTEXT_FADE_TIME)); } else { - mContextConeOpacity = lerp(mContextConeOpacity, 0.f, LLCriticalDamp::getInterpolant(0.2f)); + mContextConeOpacity = lerp(mContextConeOpacity, 0.f, LLCriticalDamp::getInterpolant(CONTEXT_FADE_TIME)); } updateImageStats(); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 689dcee663..8ab2b52a50 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -8263,6 +8263,8 @@ BOOL LLViewerMenuHolderGL::hideMenus() gParcelMgr->deselectLand(); } } + gMenuBarView->clearHoverItem(); + gMenuBarView->resetMenuTrigger(); return handled; } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 8920d09fa6..df396c93be 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2137,7 +2137,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) } // don't pass keys on to world when something in ui has focus - return gFocusMgr.childHasKeyboardFocus(mRootView); + return gFocusMgr.childHasKeyboardFocus(mRootView) || (gMenuBarView && gMenuBarView->getHighlightedItem()); } @@ -2154,6 +2154,12 @@ BOOL LLViewerWindow::handleUnicodeChar(llwchar uni_char, MASK mask) return gViewerKeyboard.handleKey(KEY_RETURN, mask, gKeyboard->getKeyRepeated(KEY_RETURN)); } + // let menus handle navigation (jump) keys + if (gMenuBarView && gMenuBarView->handleUnicodeChar(uni_char, TRUE)) + { + return TRUE; + } + // Traverses up the hierarchy LLView* keyboard_focus = gFocusMgr.getKeyboardFocus(); if( keyboard_focus ) @@ -2665,7 +2671,8 @@ BOOL LLViewerWindow::handlePerFrameHover() if (gParcelMgr && !LLFloaterLand::floaterVisible() && !LLFloaterBuyLand::isOpen() - && (!gFloaterTools || !gFloaterTools->getVisible())) + && (!gFloaterTools || !gFloaterTools->getVisible()) + && !gToolMgr) { gParcelMgr->deselectLand(); } @@ -3499,8 +3506,21 @@ BOOL LLViewerWindow::mousePointOnPlaneGlobal(LLVector3d& point, const S32 x, con mouse_direction_global_d.setVec(mouseDirectionGlobal(x,y)); LLVector3d plane_normal_global_d; plane_normal_global_d.setVec(plane_normal_global); - F64 mouse_look_at_scale = (plane_normal_global_d * (plane_point_global - gAgent.getCameraPositionGlobal())) - / (plane_normal_global_d * mouse_direction_global_d); + F64 plane_mouse_dot = (plane_normal_global_d * mouse_direction_global_d); + LLVector3d plane_origin_camera_rel = plane_point_global - gAgent.getCameraPositionGlobal(); + F64 mouse_look_at_scale = (plane_normal_global_d * plane_origin_camera_rel) + / plane_mouse_dot; + if (llabs(plane_mouse_dot) < 0.00001) + { + // if mouse is parallel to plane, return closest point on line through plane origin + // that is parallel to camera plane by scaling mouse direction vector + // by distance to plane origin, modulated by deviation of mouse direction from plane origin + LLVector3d plane_origin_dir = plane_origin_camera_rel; + plane_origin_dir.normVec(); + + mouse_look_at_scale = plane_origin_camera_rel.magVec() / (plane_origin_dir * mouse_direction_global_d); + } + point = gAgent.getCameraPositionGlobal() + mouse_look_at_scale * mouse_direction_global_d; return mouse_look_at_scale > 0.0; |