diff options
author | James Cook <james@lindenlab.com> | 2009-07-06 21:58:04 +0000 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2009-07-06 21:58:04 +0000 |
commit | d6101558a171dbd2390792ac1e78d09fc2c27711 (patch) | |
tree | e5fea96c850fb254237c2869f2234fc4a4367e98 /indra/newview/lltoolgrab.cpp | |
parent | 39905b927d60e204438705728d2c214cb3f9ef81 (diff) |
Merge xui-army-5 to viewer-2, includes layout, art, and color changes, also UI color refactoring and new FreeType font library on Linux.
svn merge -r126038:126164 svn+ssh://svn.lindenlab.com/svn/linden/branches/skinning/xui-army-5
Diffstat (limited to 'indra/newview/lltoolgrab.cpp')
-rw-r--r-- | indra/newview/lltoolgrab.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/indra/newview/lltoolgrab.cpp b/indra/newview/lltoolgrab.cpp index 88e79fd4f4..abadd251c1 100644 --- a/indra/newview/lltoolgrab.cpp +++ b/indra/newview/lltoolgrab.cpp @@ -510,8 +510,8 @@ void LLToolGrab::handleHoverActive(S32 x, S32 y, MASK mask) const F32 RADIANS_PER_PIXEL_X = 0.01f; const F32 RADIANS_PER_PIXEL_Y = 0.01f; - S32 dx = x - (gViewerWindow->getWindowWidth() / 2); - S32 dy = y - (gViewerWindow->getWindowHeight() / 2); + S32 dx = x - (gViewerWindow->getWorldViewWidth() / 2); + S32 dy = y - (gViewerWindow->getWorldViewHeight() / 2); if (dx != 0 || dy != 0) { @@ -631,10 +631,10 @@ void LLToolGrab::handleHoverActive(S32 x, S32 y, MASK mask) // Handle auto-rotation at screen edge. LLVector3 grab_pos_agent = gAgent.getPosAgentFromGlobal( grab_point_global ); - LLCoordGL grab_center_gl( gViewerWindow->getWindowWidth() / 2, gViewerWindow->getWindowHeight() / 2); + LLCoordGL grab_center_gl( gViewerWindow->getWorldViewWidth() / 2, gViewerWindow->getWorldViewHeight() / 2); LLViewerCamera::getInstance()->projectPosAgentToScreen(grab_pos_agent, grab_center_gl); - const S32 ROTATE_H_MARGIN = gViewerWindow->getWindowWidth() / 20; + const S32 ROTATE_H_MARGIN = gViewerWindow->getWorldViewWidth() / 20; const F32 ROTATE_ANGLE_PER_SECOND = 30.f * DEG_TO_RAD; const F32 rotate_angle = ROTATE_ANGLE_PER_SECOND / gFPSClamped; // ...build mode moves camera about focus point @@ -649,7 +649,7 @@ void LLToolGrab::handleHoverActive(S32 x, S32 y, MASK mask) gAgent.cameraOrbitAround(rotate_angle); } } - else if (grab_center_gl.mX > gViewerWindow->getWindowWidth() - ROTATE_H_MARGIN) + else if (grab_center_gl.mX > gViewerWindow->getWorldViewWidth() - ROTATE_H_MARGIN) { if (gAgent.getFocusOnAvatar()) { @@ -662,7 +662,7 @@ void LLToolGrab::handleHoverActive(S32 x, S32 y, MASK mask) } // Don't move above top of screen or below bottom - if ((grab_center_gl.mY < gViewerWindow->getWindowHeight() - 6) + if ((grab_center_gl.mY < gViewerWindow->getWorldViewHeight() - 6) && (grab_center_gl.mY > 24)) { // Transmit update to simulator @@ -884,7 +884,7 @@ void LLToolGrab::handleHoverInactive(S32 x, S32 y, MASK mask) // Look for cursor against the edge of the screen // Only works in fullscreen - if (!gSavedSettings.getBOOL("NotFullScreen")) + if (gSavedSettings.getBOOL("WindowFullScreen")) { if (gAgent.cameraThirdPerson() ) { @@ -893,7 +893,7 @@ void LLToolGrab::handleHoverInactive(S32 x, S32 y, MASK mask) gAgent.yaw(rotate_angle); //gAgent.setControlFlags(AGENT_CONTROL_YAW_POS); } - else if (x == (gViewerWindow->getWindowWidth() - 1) ) + else if (x == (gViewerWindow->getWorldViewWidth() - 1) ) { gAgent.yaw(-rotate_angle); //gAgent.setControlFlags(AGENT_CONTROL_YAW_NEG); |