diff options
author | dolphin <dolphin@lindenlab.com> | 2013-08-21 15:43:09 -0700 |
---|---|---|
committer | dolphin <dolphin@lindenlab.com> | 2013-08-21 15:43:09 -0700 |
commit | 257110c11e5546f0a5a07b087694cfc9059367b4 (patch) | |
tree | 2fdd2a90fd32a17a950a055068d9eb39686ba96f /indra/newview/llpreviewscript.cpp | |
parent | 98628066eb27d4f2616479538ae20a07bf92cd98 (diff) |
Added new fields to the experience cache.
Experience profile moved to it's own floater, will probalby be moving again.
XP profile displays most data, though the presentation is not final
Fixed a bug with the XP selection combobox in the script editor
Diffstat (limited to 'indra/newview/llpreviewscript.cpp')
-rwxr-xr-x | indra/newview/llpreviewscript.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index f5a6ec3dd3..7c2638d82b 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -87,6 +87,7 @@ #include "llviewercontrol.h" #include "llappviewer.h" #include "llexperiencecache.h" +#include "llfloaterexperienceprofile.h" #include "llexperienceassociationresponder.h" const std::string HELLO_LSL = @@ -407,6 +408,22 @@ void LLLiveLSLEditor::experienceChanged() } } +void LLLiveLSLEditor::onViewProfile( LLUICtrl *ui, void* userdata ) +{ + LLLiveLSLEditor* self = (LLLiveLSLEditor*)userdata; + + LLUUID id; + if(self->mExperienceEnabled->get()) + { + id=self->mScriptEd->getAssociatedExperience(); + if(id.notNull()) + { + LLFloaterReg::showInstance("experience_profile", id, true); + } + } + +} + void LLLiveLSLEditor::onToggleExperience( LLUICtrl *ui, void* userdata ) { LLLiveLSLEditor* self = (LLLiveLSLEditor*)userdata; @@ -1306,7 +1323,7 @@ void LLLiveLSLEditor::addExperienceInfo(const LLSD& experience, BOOL enabled) void LLLiveLSLEditor::buildExperienceList() { - mExperiences->clear(); + mExperiences->clearRows(); bool foundAssociated=false; for(LLSD::array_const_iterator it = mExperienceIds.beginArray(); it != mExperienceIds.endArray(); ++it) { @@ -1916,6 +1933,7 @@ BOOL LLLiveLSLEditor::postBuild() mExperienceEnabled = getChild<LLCheckBoxCtrl>("enable_xp"); childSetCommitCallback("enable_xp", onToggleExperience, this); + childSetCommitCallback("view_profile", onViewProfile, this); return LLPreview::postBuild(); |