summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2019-01-23 22:22:41 +0000
committerRider Linden <rider@lindenlab.com>2019-01-23 22:22:41 +0000
commit71d266e6d9c0e328f1a898b1233f686ea36577ba (patch)
tree45afb0811ff260c71488a48ee5d0ff71dd2b48ed /indra/newview
parenta7570ae344cd4e2aeaf49b7770aa8a5e14d53863 (diff)
parentdeac9ae7d84776d1f8497af82ed39e5d53e722d9 (diff)
Merged in andreykproductengine/maint-eep (pull request #232)
SL-1932 Day Cycle Edit feature "Load Track"
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloatereditextdaycycle.cpp123
-rw-r--r--indra/newview/llfloatereditextdaycycle.h12
-rw-r--r--indra/newview/llfloaterfixedenvironment.cpp4
-rw-r--r--indra/newview/llpanelenvironment.cpp2
-rw-r--r--indra/newview/llsettingspicker.cpp126
-rw-r--r--indra/newview/llsettingspicker.h15
-rw-r--r--indra/newview/skins/default/xui/en/floater_settings_picker.xml50
7 files changed, 277 insertions, 55 deletions
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp
index 9583f9f792..d6c104547d 100644
--- a/indra/newview/llfloatereditextdaycycle.cpp
+++ b/indra/newview/llfloatereditextdaycycle.cpp
@@ -287,8 +287,6 @@ BOOL LLFloaterEditExtDayCycle::postBuild()
panel->setOnDirtyFlagChanged([this](LLPanel *, bool val) { onPanelDirtyFlagChanged(val); });
}
- //getChild<LLButton>("sky1_track", true)->setToggleState(true);
-
return TRUE;
}
@@ -751,7 +749,7 @@ void LLFloaterEditExtDayCycle::onButtonLoadFrame()
{
curitemId = LLFloaterSettingsPicker::findItemID(mCurrentEdit->getAssetId(), false, false);
}
-
+
doOpenInventoryFloater((mCurrentTrack == LLSettingsDay::TRACK_WATER) ? LLSettingsType::ST_WATER : LLSettingsType::ST_SKY, curitemId);
}
@@ -810,7 +808,14 @@ void LLFloaterEditExtDayCycle::onCloneTrack()
void LLFloaterEditExtDayCycle::onLoadTrack()
{
+ LLUUID curitemId = mInventoryId;
+
+ if (mCurrentEdit && curitemId.notNull())
+ {
+ curitemId = LLFloaterSettingsPicker::findItemID(mCurrentEdit->getAssetId(), false, false);
+ }
+ doOpenInventoryFloater(LLSettingsType::ST_DAYCYCLE, curitemId);
}
@@ -1021,6 +1026,34 @@ void LLFloaterEditExtDayCycle::onTimeSliderCallback()
selectFrame(mTimeSlider->getCurSliderValue(), LLSettingsDay::DEFAULT_FRAME_SLOP_FACTOR);
}
+void LLFloaterEditExtDayCycle::cloneTrack(U32 source_index, U32 dest_index)
+{
+ cloneTrack(mEditDay, source_index, dest_index);
+}
+
+void LLFloaterEditExtDayCycle::cloneTrack(const LLSettingsDay::ptr_t &source_day, U32 source_index, U32 dest_index)
+{
+ if (source_index == LLSettingsDay::TRACK_WATER || dest_index == LLSettingsDay::TRACK_WATER)
+ {
+ LL_WARNS() << "water track can't be source or destination for copying" << LL_ENDL;
+ return;
+ }
+
+ // don't use replaceCycleTrack because we will end up with references, but we need to clone
+ mEditDay->clearCycleTrack(dest_index); // because source can be empty
+ LLSettingsDay::CycleTrack_t source_track = source_day->getCycleTrack(source_index);
+
+ for (auto &track_frame : source_track)
+ {
+ LLSettingsSky::ptr_t psky = std::static_pointer_cast<LLSettingsSky>(track_frame.second);
+ mEditDay->setSettingsAtKeyframe(psky->buildDerivedClone(), track_frame.first, dest_index);
+ }
+
+ updateSlider();
+ updateTabs();
+ updateButtons();
+}
+
void LLFloaterEditExtDayCycle::selectTrack(U32 track_index, bool force )
{
if (track_index < LLSettingsDay::TRACK_MAX)
@@ -1180,8 +1213,6 @@ void LLFloaterEditExtDayCycle::updateButtons()
bool can_load(true);
bool can_clear(true);
- can_clear = (mCurrentTrack > 1) ? (!mEditDay->getCycleTrack(mCurrentTrack).empty()) : (mEditDay->getCycleTrack(mCurrentTrack).size() > 1);
-
if (mCurrentTrack == 0)
{
can_clone = false;
@@ -1196,12 +1227,20 @@ void LLFloaterEditExtDayCycle::updateButtons()
}
}
+ can_clear = (mCurrentTrack > 1) ? (!mEditDay->getCycleTrack(mCurrentTrack).empty()) : (mEditDay->getCycleTrack(mCurrentTrack).size() > 1);
mCloneTrack->setEnabled(can_clone && false);
mCloneTrack->setVisible(false);
- mLoadTrack->setEnabled(can_load && false);
- mLoadTrack->setVisible(false);
+ mLoadTrack->setEnabled(can_load);
mClearTrack->setEnabled(can_clear);
+ // update track buttons
+ bool extended_env = LLEnvironment::instance().isExtendedEnvironmentEnabled();
+ for (S32 track = 0; track < LLSettingsDay::TRACK_MAX; ++track)
+ {
+ LLButton* button = getChild<LLButton>(track_tabs[track], true);
+ button->setEnabled(extended_env);
+ button->setToggleState(track == mCurrentTrack);
+ }
}
void LLFloaterEditExtDayCycle::updateSlider()
@@ -1784,17 +1823,18 @@ void LLFloaterEditExtDayCycle::doOpenInventoryFloater(LLSettingsType::type_e typ
if (!picker)
{
picker = new LLFloaterSettingsPicker(this,
- LLUUID::null, "SELECT SETTINGS");
+ LLUUID::null);
mInventoryFloater = picker->getHandle();
- picker->setCommitCallback([this](LLUICtrl *, const LLSD &data){ onPickerCommitSetting(data.asUUID()); });
+ picker->setCommitCallback([this](LLUICtrl *, const LLSD &data){ onPickerCommitSetting(data["ItemId"].asUUID(), data["Track"].asInteger()); });
}
picker->setSettingsFilter(type);
picker->setSettingsItemId(curritem);
picker->openFloater();
picker->setFocus(TRUE);
+ picker->setTrackWater(mCurrentTrack == LLSettingsDay::TRACK_WATER);
}
void LLFloaterEditExtDayCycle::doCloseInventoryFloater(bool quitting)
@@ -1807,25 +1847,39 @@ void LLFloaterEditExtDayCycle::doCloseInventoryFloater(bool quitting)
}
}
-void LLFloaterEditExtDayCycle::onPickerCommitSetting(LLUUID item_id)
+void LLFloaterEditExtDayCycle::onPickerCommitSetting(LLUUID item_id, S32 track)
{
LLSettingsBase::TrackPosition frame(mTimeSlider->getCurSliderValue());
- S32 track = mCurrentTrack;
LLViewerInventoryItem *itemp = gInventory.getItem(item_id);
if (itemp)
{
LLSettingsVOBase::getSettingsAsset(itemp->getAssetUUID(),
- [this, track, frame, item_id](LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, LLExtStat) { onAssetLoadedForFrame(item_id, asset_id, settings, status, track, frame); });
+ [this, track, frame, item_id](LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, LLExtStat) { onAssetLoadedForInsertion(item_id, asset_id, settings, status, track, mCurrentTrack, frame); });
}
}
-void LLFloaterEditExtDayCycle::onAssetLoadedForFrame(LLUUID item_id, LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, S32 track, LLSettingsBase::TrackPosition frame)
+void LLFloaterEditExtDayCycle::onAssetLoadedForInsertion(LLUUID item_id, LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, S32 source_track, S32 dest_track, LLSettingsBase::TrackPosition frame)
{
- std::function<void()> cb = [this, settings, frame, track]()
+ std::function<void()> cb = [this, settings, frame, source_track, dest_track]()
{
- if (mFramesSlider->getCurSlider().empty())
+ if (settings->getSettingsType() == "daycycle")
+ {
+ // Load full track
+ LLSettingsDay::ptr_t pday = std::dynamic_pointer_cast<LLSettingsDay>(settings);
+ if (dest_track == LLSettingsDay::TRACK_WATER)
+ {
+ cloneTrack(pday, LLSettingsDay::TRACK_WATER, LLSettingsDay::TRACK_WATER);
+ }
+ else
+ {
+ cloneTrack(pday, source_track, dest_track);
+ }
+ }
+ else
{
- if ((mEditDay->getSettingsNearKeyframe(frame, mCurrentTrack, LLSettingsDay::DEFAULT_FRAME_SLOP_FACTOR)).second)
+ // load single frame
+
+ if ((mEditDay->getSettingsNearKeyframe(frame, dest_track, LLSettingsDay::DEFAULT_FRAME_SLOP_FACTOR)).second)
{
LL_WARNS("ENVDAYEDIT") << "Attempt to add new frame too close to existing frame." << LL_ENDL;
return;
@@ -1835,23 +1889,36 @@ void LLFloaterEditExtDayCycle::onAssetLoadedForFrame(LLUUID item_id, LLUUID asse
LL_WARNS("ENVDAYEDIT") << "Attempt to add new frame when slider is full." << LL_ENDL;
return;
}
- mEditDay->setSettingsAtKeyframe(settings, frame, track);
- addSliderFrame(frame, settings, false);
- reblendSettings();
- synchronizeTabs();
- }
- else
- {
- if (mCurrentTrack == LLSettingsDay::TRACK_WATER)
+ // Don't forget to clone (we might reuse/load it couple times)
+ if (settings->getSettingsType() == "sky")
{
- mEditDay->setWaterAtKeyframe(std::static_pointer_cast<LLSettingsWater>(settings), frame);
+ // Load sky to frame
+ if (dest_track != LLSettingsDay::TRACK_WATER)
+ {
+ mEditDay->setSettingsAtKeyframe(settings->buildDerivedClone(), frame, dest_track);
+ addSliderFrame(frame, settings, false);
+ }
+ else
+ {
+ LL_WARNS("ENVDAYEDIT") << "Trying to load day settings as sky" << LL_ENDL;
+ }
}
- else
+ else if (settings->getSettingsType() == "water")
{
- mEditDay->setSkyAtKeyframe(std::static_pointer_cast<LLSettingsSky>(settings), frame, track);
+ // Load water to frame
+ if (dest_track == LLSettingsDay::TRACK_WATER)
+ {
+ mEditDay->setSettingsAtKeyframe(settings->buildDerivedClone(), frame, dest_track);
+ addSliderFrame(frame, settings, false);
+ }
+ else
+ {
+ LL_WARNS("ENVDAYEDIT") << "Trying to load water settings as sky" << LL_ENDL;
+ }
}
- updateTabs();
}
+ reblendSettings();
+ synchronizeTabs();
};
if (!settings || status)
diff --git a/indra/newview/llfloatereditextdaycycle.h b/indra/newview/llfloatereditextdaycycle.h
index 67a6f1e0e9..e808ab8a46 100644
--- a/indra/newview/llfloatereditextdaycycle.h
+++ b/indra/newview/llfloatereditextdaycycle.h
@@ -132,6 +132,8 @@ private:
void checkAndConfirmSettingsLoss(on_confirm_fn cb);
+ void cloneTrack(U32 source_index, U32 dest_index);
+ void cloneTrack(const LLSettingsDay::ptr_t &source_day, U32 source_index, U32 dest_index);
void selectTrack(U32 track_index, bool force = false);
void selectFrame(F32 frame, F32 slop_factor);
void clearTabs();
@@ -160,8 +162,14 @@ private:
void doOpenInventoryFloater(LLSettingsType::type_e type, LLUUID curritem);
void doCloseInventoryFloater(bool quitting = false);
- void onPickerCommitSetting(LLUUID item_id);
- void onAssetLoadedForFrame(LLUUID item_id, LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, S32 track, LLSettingsBase::TrackPosition frame);
+ void onPickerCommitSetting(LLUUID item_id, S32 track);
+ void onAssetLoadedForInsertion(LLUUID item_id,
+ LLUUID asset_id,
+ LLSettingsBase::ptr_t settings,
+ S32 status,
+ S32 source_track,
+ S32 dest_track,
+ LLSettingsBase::TrackPosition dest_frame);
bool canUseInventory() const;
bool canApplyRegion() const;
diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp
index 4e6bc6eae0..ce231973c7 100644
--- a/indra/newview/llfloaterfixedenvironment.cpp
+++ b/indra/newview/llfloaterfixedenvironment.cpp
@@ -239,11 +239,11 @@ LLFloaterSettingsPicker * LLFloaterFixedEnvironment::getSettingsPicker()
if (!picker)
{
picker = new LLFloaterSettingsPicker(this,
- LLUUID::null, "SELECT SETTINGS");
+ LLUUID::null);
mInventoryFloater = picker->getHandle();
- picker->setCommitCallback([this](LLUICtrl *, const LLSD &data){ onPickerCommitSetting(data.asUUID()); });
+ picker->setCommitCallback([this](LLUICtrl *, const LLSD &data){ onPickerCommitSetting(data["ItemId"].asUUID() /*data["Track"]*/); });
}
return picker;
diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp
index ec6352c88d..000c7050ab 100644
--- a/indra/newview/llpanelenvironment.cpp
+++ b/indra/newview/llpanelenvironment.cpp
@@ -334,7 +334,7 @@ LLFloaterSettingsPicker * LLPanelEnvironmentInfo::getSettingsPicker(bool create)
if (!picker && create)
{
picker = new LLFloaterSettingsPicker(this,
- LLUUID::null, "SELECT SETTINGS");
+ LLUUID::null);
mSettingsFloater = picker->getHandle();
diff --git a/indra/newview/llsettingspicker.cpp b/indra/newview/llsettingspicker.cpp
index d115f6fa4f..a155906415 100644
--- a/indra/newview/llsettingspicker.cpp
+++ b/indra/newview/llsettingspicker.cpp
@@ -28,6 +28,7 @@
#include "llsettingspicker.h"
+#include "llcombobox.h"
#include "llfiltereditor.h"
#include "llfolderviewmodel.h"
#include "llinventory.h"
@@ -36,6 +37,7 @@
#include "llinventorymodelbackgroundfetch.h"
#include "llinventoryobserver.h"
#include "llinventorypanel.h"
+#include "llsettingsvo.h"
#include "lldraghandle.h"
#include "llviewercontrol.h"
@@ -47,23 +49,34 @@ namespace
const std::string FLOATER_DEFINITION_XML("floater_settings_picker.xml");
const std::string FLT_INVENTORY_SEARCH("flt_inventory_search");
+ const std::string CMB_TRACK_SELECTION("track_selection");
const std::string PNL_INVENTORY("pnl_inventory");
+ const std::string PNL_COMBO("pnl_combo");
const std::string BTN_SELECT("btn_select");
const std::string BTN_CANCEL("btn_cancel");
const F32 CONTEXT_CONE_IN_ALPHA(0.0f);
const F32 CONTEXT_CONE_OUT_ALPHA(1.0f);
const F32 CONTEXT_FADE_TIME(0.08f);
+
+ // strings in xml
+
+ const std::string STR_TITLE_PREFIX = "pick title";
+ const std::string STR_TITLE_TRACK = "pick_track";
+ const std::string STR_TITLE_SETTINGS = "pick_settings";
+ const std::string STR_TRACK_WATER = "track_water";
+ const std::string STR_TRACK_GROUND = "track_ground";
+ const std::string STR_TRACK_SKY = "track_sky";
}
//=========================================================================
-LLFloaterSettingsPicker::LLFloaterSettingsPicker(LLView * owner, LLUUID initial_item_id, const std::string &label, const LLSD &params):
+LLFloaterSettingsPicker::LLFloaterSettingsPicker(LLView * owner, LLUUID initial_item_id, const LLSD &params):
LLFloater(params),
mOwnerHandle(),
- mLabel(label),
mActive(true),
mContextConeOpacity(0.0f),
mSettingItemID(initial_item_id),
+ mTrackWater(true),
mImmediateFilterPermMask(PERM_NONE)
{
mOwnerHandle = owner->getHandle();
@@ -84,12 +97,9 @@ BOOL LLFloaterSettingsPicker::postBuild()
if (!LLFloater::postBuild())
return FALSE;
- if (!mLabel.empty())
- {
- std::string pick = getString("pick title");
-
- setTitle(pick + mLabel);
- }
+ std::string prefix = getString(STR_TITLE_PREFIX);
+ std::string label = getString(STR_TITLE_SETTINGS);
+ setTitle(prefix + " " + label);
mFilterEdit = getChild<LLFilterEditor>(FLT_INVENTORY_SEARCH);
mFilterEdit->setCommitCallback([this](LLUICtrl*, const LLSD& param){ onFilterEdit(param.asString()); });
@@ -162,6 +172,21 @@ void LLFloaterSettingsPicker::setSettingsFilter(LLSettingsType::type_e type)
filter = static_cast<S64>(0x1) << static_cast<S64>(type);
}
+ bool day_cycle = (type != LLSettingsType::ST_WATER) && (type != LLSettingsType::ST_SKY);
+ getChild<LLPanel>(PNL_COMBO)->setVisible(day_cycle);
+ std::string prefix = getString(STR_TITLE_PREFIX);
+ std::string label;
+ if (day_cycle)
+ {
+
+ label = getString(STR_TITLE_TRACK);
+ }
+ else
+ {
+ label = getString(STR_TITLE_SETTINGS);
+ }
+ setTitle(prefix + " " + label);
+
mInventoryPanel->setFilterSettingsTypes(filter);
}
@@ -263,6 +288,8 @@ void LLFloaterSettingsPicker::onFilterEdit(const std::string& search_string)
void LLFloaterSettingsPicker::onSelectionChange(const LLFloaterSettingsPicker::itemlist_t &items, bool user_action)
{
+ bool track_picker_enabled = false;
+ LLUUID asset_id;
if (items.size())
{
LLFolderViewItem* first_item = items.front();
@@ -278,15 +305,77 @@ void LLFloaterSettingsPicker::onSelectionChange(const LLFloaterSettingsPicker::i
mNoCopySettingsSelected = true;
}
setSettingsItemId(bridge_model->getItem()->getUUID(), false);
+ asset_id = bridge_model->getItem()->getAssetUUID();
mViewModel->setDirty(); // *TODO: shouldn't we be using setValue() here?
if (user_action)
{
mChangeIDSignal(mSettingItemID);
}
+
+ if (bridge_model->getSettingsType() == LLSettingsType::ST_DAYCYCLE
+ && !mNoCopySettingsSelected)
+ {
+ track_picker_enabled = true;
+ }
}
}
}
+ getChild<LLView>(CMB_TRACK_SELECTION)->setEnabled(track_picker_enabled && mSettingAssetID == asset_id);
+ if (track_picker_enabled && asset_id.notNull() && mSettingAssetID != asset_id)
+ {
+ LLUUID item_id = mSettingItemID;
+ LLHandle<LLFloater> handle = getHandle();
+ LLSettingsVOBase::getSettingsAsset(asset_id,
+ [item_id, handle](LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, LLExtStat) { LLFloaterSettingsPicker::onAssetLoadedCb(handle, item_id, asset_id, settings, status); });
+ }
+}
+
+void LLFloaterSettingsPicker::onAssetLoadedCb(LLHandle<LLFloater> handle, LLUUID item_id, LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status)
+{
+ if (handle.isDead() || status)
+ {
+ return;
+ }
+
+ LLFloaterSettingsPicker *picker = static_cast<LLFloaterSettingsPicker *>(handle.get());
+
+ if (picker->mSettingItemID != item_id)
+ {
+ return;
+ }
+
+ picker->onAssetLoaded(asset_id, settings);
+}
+
+void LLFloaterSettingsPicker::onAssetLoaded(LLUUID asset_id, LLSettingsBase::ptr_t settings)
+{
+ LLComboBox* track_selection = getChild<LLComboBox>(CMB_TRACK_SELECTION);
+ track_selection->clear();
+ track_selection->removeall();
+ LLSettingsDay::ptr_t pday = std::dynamic_pointer_cast<LLSettingsDay>(settings);
+
+ if (mTrackWater)
+ {
+ track_selection->add(getString(STR_TRACK_WATER), LLSD::Integer(LLSettingsDay::TRACK_WATER), ADD_TOP, true);
+ }
+ else
+ {
+ // track 1 always present
+ track_selection->add(getString(STR_TRACK_GROUND), LLSD::Integer(LLSettingsDay::TRACK_GROUND_LEVEL), ADD_TOP, true);
+ LLUIString formatted_label = getString(STR_TRACK_SKY);
+ for (int i = 2; i < LLSettingsDay::TRACK_MAX; i++)
+ {
+ if (!pday->isTrackEmpty(i))
+ {
+ formatted_label.setArg("[NUM]", llformat("%d", i));
+ track_selection->add(formatted_label.getString(), LLSD::Integer(i), ADD_TOP, true);
+ }
+ }
+ }
+
+ mSettingAssetID = asset_id;
+ track_selection->setEnabled(true);
}
void LLFloaterSettingsPicker::onButtonCancel()
@@ -297,7 +386,12 @@ void LLFloaterSettingsPicker::onButtonCancel()
void LLFloaterSettingsPicker::onButtonSelect()
{
if (mCommitSignal)
- (*mCommitSignal)(this, LLSD(mSettingItemID));
+ {
+ LLSD res;
+ res["ItemId"] = mSettingItemID;
+ res["Track"] = getChild<LLComboBox>(CMB_TRACK_SELECTION)->getValue();
+ (*mCommitSignal)(this, res);
+ }
closeFloater();
}
@@ -321,7 +415,12 @@ BOOL LLFloaterSettingsPicker::handleDoubleClick(S32 x, S32 y, MASK mask)
{
// Quick-apply
if (mCommitSignal)
- (*mCommitSignal)(this, LLSD(mSettingItemID));
+ {
+ LLSD res;
+ res["ItemId"] = mSettingItemID;
+ res["Track"] = getChild<LLComboBox>(CMB_TRACK_SELECTION)->getValue();
+ (*mCommitSignal)(this, res);
+ }
closeFloater();
}
}
@@ -346,7 +445,12 @@ BOOL LLFloaterSettingsPicker::handleKeyHere(KEY key, MASK mask)
{
// Quick-apply
if (mCommitSignal)
- (*mCommitSignal)(this, LLSD(mSettingItemID));
+ {
+ LLSD res;
+ res["ItemId"] = mSettingItemID;
+ res["Track"] = getChild<LLComboBox>(CMB_TRACK_SELECTION)->getValue();
+ (*mCommitSignal)(this, res);
+ }
closeFloater();
return TRUE;
}
diff --git a/indra/newview/llsettingspicker.h b/indra/newview/llsettingspicker.h
index 5acc562fe5..13ee90f0fe 100644
--- a/indra/newview/llsettingspicker.h
+++ b/indra/newview/llsettingspicker.h
@@ -33,6 +33,7 @@
#include "llpermissionsflags.h"
#include "llfolderview.h"
#include "llinventory.h"
+#include "llsettingsdaycycle.h"
#include <boost/signals2.hpp>
@@ -48,7 +49,7 @@ public:
typedef std::function<void()> close_callback_t;
typedef std::function<void(const LLUUID& item_id)> id_changed_callback_t;
- LLFloaterSettingsPicker(LLView * owner, LLUUID setting_item_id, const std::string &label, const LLSD &params = LLSD());
+ LLFloaterSettingsPicker(LLView * owner, LLUUID setting_item_id, const LLSD &params = LLSD());
virtual ~LLFloaterSettingsPicker() override;
@@ -64,6 +65,10 @@ public:
void setSettingsFilter(LLSettingsType::type_e type);
LLSettingsType::type_e getSettingsFilter() const { return mSettingsType; }
+ // Only for day cycle
+ void setTrackWater(bool use_water) { mTrackWater = use_water; }
+ void setTrackSky(bool use_sky) { mTrackWater = !use_sky; }
+
// Takes a UUID, wraps get/setImageAssetID
virtual void setValue(const LLSD& value) override;
virtual LLSD getValue() const override;
@@ -86,11 +91,14 @@ public:
static LLInventoryItem * findItem(const LLUUID& asset_id, bool copyable_only, bool ignore_library);
+
private:
typedef std::deque<LLFolderViewItem *> itemlist_t;
void onFilterEdit(const std::string& search_string);
void onSelectionChange(const itemlist_t &items, bool user_action);
+ static void onAssetLoadedCb(LLHandle<LLFloater> handle, LLUUID item_id, LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status);
+ void onAssetLoaded(LLUUID asset_id, LLSettingsBase::ptr_t settings);
void onButtonCancel();
void onButtonSelect();
virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask) override;
@@ -98,8 +106,9 @@ private:
LLHandle<LLView> mOwnerHandle;
- std::string mLabel;
- LLUUID mSettingItemID;
+ LLUUID mSettingItemID;
+ LLUUID mSettingAssetID;
+ bool mTrackWater;
LLFilterEditor * mFilterEdit;
LLInventoryPanel * mInventoryPanel;
diff --git a/indra/newview/skins/default/xui/en/floater_settings_picker.xml b/indra/newview/skins/default/xui/en/floater_settings_picker.xml
index 7cc2c517ca..55a1b540b4 100644
--- a/indra/newview/skins/default/xui/en/floater_settings_picker.xml
+++ b/indra/newview/skins/default/xui/en/floater_settings_picker.xml
@@ -14,13 +14,30 @@
<!-- top static -->
<floater.string
- name="choose_picture">
- Click to choose a picture
- </floater.string>
- <floater.string
name="pick title">
Pick:
</floater.string>
+ <floater.string
+ name="pick_track">
+ SELECT TRACK
+ </floater.string>
+ <floater.string
+ name="pick_settings">
+ SELECT SETTINGS
+ </floater.string>
+
+ <floater.string
+ name="track_water">
+ Water
+ </floater.string>
+ <floater.string
+ name="track_ground">
+ Ground
+ </floater.string>
+ <floater.string
+ name="track_sky">
+ Sky[NUM]
+ </floater.string>
<layout_stack name="test_stack"
follows="all"
@@ -30,10 +47,10 @@
right="-6"
bottom="-10"
orientation="vertical">
- <layout_panel name="temp"
+ <layout_panel name="inv_list"
border="false"
auto_resize="true"
- user_resize="true"
+ user_resize="false"
height="29"
min_height="29"
bg_alpha_color="blue"
@@ -72,14 +89,31 @@
filter_asset_type="settings" />
</panel>
</layout_panel>
+ <layout_panel name="pnl_combo"
+ border="false"
+ auto_resize="false"
+ user_resize="false"
+ visible="true"
+ height="29"
+ bg_alpha_color="blue"
+ background_visible="false">
+ <combo_box
+ allow_text_entry="false"
+ follows="left|top"
+ height="23"
+ left="10"
+ max_chars="100"
+ mouse_opaque="true"
+ name="track_selection"
+ top="1"
+ width="190"/>
+ </layout_panel>
<layout_panel name="temp"
border="false"
auto_resize="false"
user_resize="false"
height="29"
min_height="29">
- <!-- bg_alpha_color="red"
- background_visible="true" -->
<button
follows="top|left"
height="20"