summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRick Pasetto <rick@lindenlab.com>2009-11-23 17:18:54 -0800
committerRick Pasetto <rick@lindenlab.com>2009-11-23 17:18:54 -0800
commitdbe1f9755896e41e2064a3ee69725d753c67921f (patch)
tree2dc5cf1553a82c224ae5e537f681077dfbd22d80
parent0627d550f371c26b00e802bae288a5e6def53345 (diff)
Highlight the object if it is being dragged over and can be dropped upon
-rw-r--r--indra/newview/llviewerwindow.cpp10
-rw-r--r--indra/newview/llviewerwindow.h3
2 files changed, 11 insertions, 2 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 55e66e1138..17b9490f63 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -833,7 +833,8 @@ BOOL LLViewerWindow::handleDragNDrop( LLWindow *window, LLCoordGL pos, MASK mas
llinfos << "### Object: picked at " << pos.mX << ", " << pos.mY << " - face = " << object_face << " - URL = " << url << llendl;
LLVOVolume *obj = dynamic_cast<LLVOVolume*>(static_cast<LLViewerObject*>(pick_info.getObject()));
- if (obj)
+ gPipeline.setHighlightObject(NULL);
+ if (obj && obj->permModify())
{
LLTextureEntry *te = obj->getTE(object_face);
if (te)
@@ -859,11 +860,16 @@ BOOL LLViewerWindow::handleDragNDrop( LLWindow *window, LLCoordGL pos, MASK mas
}
}
else {
- // XXX TODO: make object glow? Hard because how do we "unglow?"
+ mDragHoveredObject = obj;
+ // Make the object glow
+ gPipeline.setHighlightObject(mDragHoveredObject->mDrawable);
}
result = TRUE;
}
}
+ else {
+ mDragHoveredObject = NULL;
+ }
}
return result;
}
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index 311fea3508..428c602b73 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -474,6 +474,9 @@ protected:
static std::string sSnapshotDir;
static std::string sMovieBaseName;
+
+private:
+ LLPointer<LLViewerObject> mDragHoveredObject;
};
void toggle_flying(void*);