Remove redundant pick hover logic. Already handled in LLToolPie.
This commit is contained in:
@@ -1676,7 +1676,6 @@ LLViewerWindow::LLViewerWindow(
|
|||||||
mHideCursorPermanent( FALSE ),
|
mHideCursorPermanent( FALSE ),
|
||||||
mCursorHidden(FALSE),
|
mCursorHidden(FALSE),
|
||||||
mIgnoreActivate( FALSE ),
|
mIgnoreActivate( FALSE ),
|
||||||
mHoverPick(),
|
|
||||||
mResDirty(false),
|
mResDirty(false),
|
||||||
//mStatesDirty(false), //Singu Note: No longer needed. State update is now in restoreGL.
|
//mStatesDirty(false), //Singu Note: No longer needed. State update is now in restoreGL.
|
||||||
mIsFullscreenChecked(false),
|
mIsFullscreenChecked(false),
|
||||||
@@ -3416,40 +3415,9 @@ void LLViewerWindow::updateUI()
|
|||||||
{
|
{
|
||||||
LLSelectMgr::getInstance()->deselectUnused();
|
LLSelectMgr::getInstance()->deselectUnused();
|
||||||
}
|
}
|
||||||
|
|
||||||
// per frame picking - for tooltips and changing cursor over interactive objects
|
|
||||||
static S32 previous_x = -1;
|
|
||||||
static S32 previous_y = -1;
|
|
||||||
static BOOL mouse_moved_since_pick = FALSE;
|
|
||||||
|
|
||||||
if ((previous_x != x) || (previous_y != y))
|
|
||||||
mouse_moved_since_pick = TRUE;
|
|
||||||
|
|
||||||
static const LLCachedControl<F32> picks_moving("PicksPerSecondMouseMoving",5.f);
|
|
||||||
static const LLCachedControl<F32> picks_stationary("PicksPerSecondMouseStationary",0.f);
|
|
||||||
if( !getCursorHidden()
|
|
||||||
// When in-world media is in focus, pick every frame so that browser mouse-overs, dragging scrollbars, etc. work properly.
|
|
||||||
&& (LLViewerMediaFocus::getInstance()->getFocus()
|
|
||||||
|| ((mouse_moved_since_pick) && (picks_moving > 0.0) && (mPickTimer.getElapsedTimeF32() > 1.0f / picks_moving))
|
|
||||||
|| ((!mouse_moved_since_pick) && (picks_stationary > 0.0) && (mPickTimer.getElapsedTimeF32() > 1.0f / picks_stationary))))
|
|
||||||
{
|
|
||||||
mouse_moved_since_pick = FALSE;
|
|
||||||
mPickTimer.reset();
|
|
||||||
pickAsync(getCurrentMouseX(), getCurrentMouseY(), mask, hoverPickCallback, TRUE, TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
previous_x = x;
|
|
||||||
previous_y = y;
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */
|
|
||||||
void LLViewerWindow::hoverPickCallback(const LLPickInfo& pick_info)
|
|
||||||
{
|
|
||||||
gViewerWindow->mHoverPick = pick_info;
|
|
||||||
}
|
|
||||||
|
|
||||||
void LLViewerWindow::updateLayout()
|
void LLViewerWindow::updateLayout()
|
||||||
{
|
{
|
||||||
static const LLCachedControl<bool> freeze_time("FreezeTime",0);
|
static const LLCachedControl<bool> freeze_time("FreezeTime",0);
|
||||||
|
|||||||
@@ -250,7 +250,6 @@ public:
|
|||||||
BOOL getRightMouseDown() const { return mRightMouseDown; }
|
BOOL getRightMouseDown() const { return mRightMouseDown; }
|
||||||
|
|
||||||
const LLPickInfo& getLastPick() const { return mLastPick; }
|
const LLPickInfo& getLastPick() const { return mLastPick; }
|
||||||
const LLPickInfo& getHoverPick() const { return mHoverPick; }
|
|
||||||
|
|
||||||
void setup2DViewport(S32 x_offset = 0, S32 y_offset = 0);
|
void setup2DViewport(S32 x_offset = 0, S32 y_offset = 0);
|
||||||
void setup3DViewport(S32 x_offset = 0, S32 y_offset = 0);
|
void setup3DViewport(S32 x_offset = 0, S32 y_offset = 0);
|
||||||
@@ -464,7 +463,6 @@ protected:
|
|||||||
BOOL mHideCursorPermanent; // true during drags, mouselook
|
BOOL mHideCursorPermanent; // true during drags, mouselook
|
||||||
BOOL mCursorHidden;
|
BOOL mCursorHidden;
|
||||||
LLPickInfo mLastPick;
|
LLPickInfo mLastPick;
|
||||||
LLPickInfo mHoverPick;
|
|
||||||
std::vector<LLPickInfo> mPicks;
|
std::vector<LLPickInfo> mPicks;
|
||||||
LLRect mPickScreenRegion; // area of frame buffer for rendering pick frames (generally follows mouse to avoid going offscreen)
|
LLRect mPickScreenRegion; // area of frame buffer for rendering pick frames (generally follows mouse to avoid going offscreen)
|
||||||
LLTimer mPickTimer; // timer for scheduling n picks per second
|
LLTimer mPickTimer; // timer for scheduling n picks per second
|
||||||
|
|||||||
Reference in New Issue
Block a user