summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/CMakeLists.txt2
-rw-r--r--indra/newview/llenvironment.cpp35
-rw-r--r--indra/newview/llenvironment.h1
-rw-r--r--indra/newview/llfloaterfixedenvironment.cpp765
-rw-r--r--indra/newview/llfloaterfixedenvironment.h84
-rw-r--r--indra/newview/llflyoutcombobtn.cpp127
-rw-r--r--indra/newview/llflyoutcombobtn.h71
-rw-r--r--indra/newview/skins/default/xui/en/floater_fixedenvironment.xml86
-rw-r--r--indra/newview/skins/default/xui/en/menu_save_settings.xml43
-rw-r--r--indra/newview/skins/default/xui/en/panel_outfit_edit.xml1048
10 files changed, 964 insertions, 1298 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 654487b8fb..1a08bb6d74 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -320,6 +320,7 @@ set(viewer_SOURCE_FILES
llfolderviewmodelinventory.cpp
llfollowcam.cpp
llfriendcard.cpp
+ llflyoutcombobtn.cpp
llgesturelistener.cpp
llgesturemgr.cpp
llgiveinventory.cpp
@@ -941,6 +942,7 @@ set(viewer_HEADER_FILES
llfolderviewmodelinventory.h
llfollowcam.h
llfriendcard.h
+ llflyoutcombobtn.h
llgesturelistener.h
llgesturemgr.h
llgiveinventory.h
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index ad4a1fca6a..98da6ea22f 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -277,6 +277,41 @@ void LLEnvironment::setEnvironment(LLEnvironment::EnvSelection_t env, LLEnvironm
/*TODO: readjust environment*/
}
+void LLEnvironment::setEnvironment(LLEnvironment::EnvSelection_t env, const LLSettingsBase::ptr_t &settings)
+{
+ DayInstance::ptr_t environment = getEnvironmentInstance(env);
+
+ if (settings->getSettingType() == "daycycle")
+ {
+ S64Seconds daylength(LLSettingsDay::DEFAULT_DAYLENGTH);
+ S64Seconds dayoffset(LLSettingsDay::DEFAULT_DAYOFFSET);
+ if (environment)
+ {
+ daylength = environment->getDayLength();
+ dayoffset = environment->getDayOffset();
+ }
+ setEnvironment(env, std::static_pointer_cast<LLSettingsDay>(settings), daylength, dayoffset);
+ }
+ else if (settings->getSettingType() == "sky")
+ {
+ fixedEnvironment_t fixedenv(std::static_pointer_cast<LLSettingsSky>(settings), LLSettingsWater::ptr_t());
+ if (environment)
+ {
+ fixedenv.second = environment->getWater();
+ }
+ setEnvironment(env, fixedenv);
+ }
+ else if (settings->getSettingType() == "water")
+ {
+ fixedEnvironment_t fixedenv(LLSettingsSky::ptr_t(), std::static_pointer_cast<LLSettingsWater>(settings));
+ if (environment)
+ {
+ fixedenv.first = environment->getSky();
+ }
+ setEnvironment(env, fixedenv);
+ }
+}
+
void LLEnvironment::clearEnvironment(LLEnvironment::EnvSelection_t env)
{
diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h
index d8cb61d0bb..ad7d93c3c8 100644
--- a/indra/newview/llenvironment.h
+++ b/indra/newview/llenvironment.h
@@ -151,6 +151,7 @@ public:
bool hasEnvironment(EnvSelection_t env);
void setEnvironment(EnvSelection_t env, const LLSettingsDay::ptr_t &pday, S64Seconds daylength, S64Seconds dayoffset);
void setEnvironment(EnvSelection_t env, fixedEnvironment_t fixed);
+ void setEnvironment(EnvSelection_t env, const LLSettingsBase::ptr_t &fixed);
void setEnvironment(EnvSelection_t env, const LLSettingsSky::ptr_t & fixed) { setEnvironment(env, fixedEnvironment_t(fixed, LLSettingsWater::ptr_t())); }
void setEnvironment(EnvSelection_t env, const LLSettingsWater::ptr_t & fixed) { setEnvironment(env, fixedEnvironment_t(LLSettingsSky::ptr_t(), fixed)); }
void clearEnvironment(EnvSelection_t env);
diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp
index ec8e2c8965..f95e41408f 100644
--- a/indra/newview/llfloaterfixedenvironment.cpp
+++ b/indra/newview/llfloaterfixedenvironment.cpp
@@ -60,11 +60,23 @@ namespace
const std::string BUTTON_NAME_IMPORT("btn_import");
const std::string BUTTON_NAME_COMMIT("btn_commit");
const std::string BUTTON_NAME_CANCEL("btn_cancel");
+
+ const std::string ACTION_SAVE("save_settings");
+ const std::string ACTION_SAVEAS("save_as_new_settings");
+ const std::string ACTION_APPLY_LOCAL("apply_local");
+ const std::string ACTION_APPLY_PARCEL("apply_parcel");
+ const std::string ACTION_APPLY_REGION("apply_region");
}
LLFloaterFixedEnvironment::LLFloaterFixedEnvironment(const LLSD &key) :
- LLFloater(key)
+ LLFloater(key),
+ mFlyoutControl(nullptr)
+{
+}
+
+LLFloaterFixedEnvironment::~LLFloaterFixedEnvironment()
{
+ delete mFlyoutControl;
}
BOOL LLFloaterFixedEnvironment::postBuild()
@@ -77,9 +89,11 @@ BOOL LLFloaterFixedEnvironment::postBuild()
getChild<LLButton>(BUTTON_NAME_LOAD)->setClickedCallback([this](LLUICtrl *, const LLSD &) { onButtonLoad(); });
getChild<LLButton>(BUTTON_NAME_IMPORT)->setClickedCallback([this](LLUICtrl *, const LLSD &) { onButtonImport(); });
- getChild<LLButton>(BUTTON_NAME_COMMIT)->setClickedCallback([this](LLUICtrl *, const LLSD &) { onButtonApply(); });
getChild<LLButton>(BUTTON_NAME_CANCEL)->setClickedCallback([this](LLUICtrl *, const LLSD &) { onButtonCancel(); });
+ mFlyoutControl = new LLFlyoutComboBtn(this, "btn_commit", "btn_flyout", "menu_save_settings.xml");
+ mFlyoutControl->setAction([this](LLUICtrl *ctrl, const LLSD &data) { onButtonApply(ctrl, data); });
+
return TRUE;
}
@@ -107,8 +121,10 @@ void LLFloaterFixedEnvironment::refresh()
bool enableApplyAndLoad = canUseInventory();
+ mFlyoutControl->setMenuItemEnabled(ACTION_SAVE, enableApplyAndLoad);
+ mFlyoutControl->setMenuItemEnabled(ACTION_SAVEAS, enableApplyAndLoad);
+
getChild<LLButton>(BUTTON_NAME_LOAD)->setEnabled(enableApplyAndLoad);
- getChild<LLButton>(BUTTON_NAME_COMMIT)->setEnabled(enableApplyAndLoad);
mTxtName->setValue(mSettings->getName());
@@ -149,9 +165,28 @@ void LLFloaterFixedEnvironment::onButtonImport()
doImportFromDisk();
}
-void LLFloaterFixedEnvironment::onButtonApply()
+void LLFloaterFixedEnvironment::onButtonApply(LLUICtrl *ctrl, const LLSD &data)
{
- doApplyFixedSettings();
+ std::string ctrl_action = ctrl->getName();
+
+ if (ctrl_action == ACTION_SAVE)
+ {
+ doApplyCreateNewInventory();
+ }
+ else if (ctrl_action == ACTION_SAVEAS)
+ {
+ doApplyUpdateInventory();
+ }
+ else if ((ctrl_action == ACTION_APPLY_LOCAL) ||
+ (ctrl_action == ACTION_APPLY_PARCEL) ||
+ (ctrl_action == ACTION_APPLY_REGION))
+ {
+ doApplyEnvironment(ctrl_action);
+ }
+ else
+ {
+ LL_WARNS("ENVIRONMENT") << "Unknown settings action '" << ctrl_action << "'" << LL_ENDL;
+ }
}
void LLFloaterFixedEnvironment::onButtonCancel()
@@ -160,12 +195,57 @@ void LLFloaterFixedEnvironment::onButtonCancel()
this->closeFloater();
}
+void LLFloaterFixedEnvironment::doApplyCreateNewInventory()
+{
+ // This method knows what sort of settings object to create.
+ LLSettingsVOBase::createInventoryItem(mSettings);
+}
+
+void LLFloaterFixedEnvironment::doApplyUpdateInventory()
+{
+ // todo update existing inventory object.
+}
+
+void LLFloaterFixedEnvironment::doApplyEnvironment(const std::string &where)
+{
+ LLEnvironment::EnvSelection_t env(LLEnvironment::ENV_DEFAULT);
+ bool updateSimulator( where != ACTION_APPLY_LOCAL );
+
+ if (where == ACTION_APPLY_LOCAL)
+ env = LLEnvironment::ENV_LOCAL;
+ else if (where == ACTION_APPLY_PARCEL)
+ env = LLEnvironment::ENV_PARCEL;
+ else if (where == ACTION_APPLY_REGION)
+ env = LLEnvironment::ENV_REGION;
+ else
+ {
+ LL_WARNS("ENVIRONMENT") << "Unknown apply '" << where << "'" << LL_ENDL;
+ return;
+ }
+
+ LLEnvironment::instance().setEnvironment(env, mSettings);
+ if (updateSimulator)
+ {
+ LL_WARNS("ENVIRONMENT") << "Attempting apply" << LL_ENDL;
+ }
+}
+
//-------------------------------------------------------------------------
bool LLFloaterFixedEnvironment::canUseInventory() const
{
return !gAgent.getRegionCapability("UpdateSettingsAgentInventory").empty();
}
+bool LLFloaterFixedEnvironment::canApplyRegion() const
+{
+ return true;
+}
+
+bool LLFloaterFixedEnvironment::canApplyParcel() const
+{
+ return false;
+}
+
//=========================================================================
LLFloaterFixedEnvironmentWater::LLFloaterFixedEnvironmentWater(const LLSD &key):
LLFloaterFixedEnvironment(key)
@@ -241,12 +321,6 @@ void LLFloaterFixedEnvironmentWater::doImportFromDisk()
}
}
-void LLFloaterFixedEnvironmentWater::doApplyFixedSettings()
-{
- LLSettingsVOBase::createInventoryItem(mSettings);
-
-}
-
//=========================================================================
LLFloaterFixedEnvironmentSky::LLFloaterFixedEnvironmentSky(const LLSD &key) :
LLFloaterFixedEnvironment(key)
@@ -332,674 +406,5 @@ void LLFloaterFixedEnvironmentSky::doImportFromDisk()
}
}
-void LLFloaterFixedEnvironmentSky::doApplyFixedSettings()
-{
- LLSettingsVOBase::createInventoryItem(mSettings);
-}
-
//=========================================================================
-#if 0
-// virtual
-BOOL LLFloaterEditSky::postBuild()
-{
- mSkyPresetNameEditor = getChild<LLLineEditor>("sky_preset_name");
- mSkyPresetCombo = getChild<LLComboBox>("sky_preset_combo");
- mMakeDefaultCheckBox = getChild<LLCheckBoxCtrl>("make_default_cb");
- mSaveButton = getChild<LLButton>("save");
- mSkyAdapter = boost::make_shared<LLSkySettingsAdapter>();
-
- LLEnvironment::instance().setSkyListChange(boost::bind(&LLFloaterEditSky::onSkyPresetListChange, this));
-
- initCallbacks();
-
-// // Create the sun position scrubber on the slider.
-// getChild<LLMultiSliderCtrl>("WLSunPos")->addSlider(12.f);
-
- return TRUE;
-}
-
-// virtual
-void LLFloaterEditSky::onOpen(const LLSD& key)
-{
- bool new_preset = isNewPreset();
- std::string param = key.asString();
- std::string floater_title = getString(std::string("title_") + param);
- std::string hint = getString(std::string("hint_" + param));
-
- // Update floater title.
- setTitle(floater_title);
-
- // Update the hint at the top.
- getChild<LLUICtrl>("hint")->setValue(hint);
-
- // Hide the hint to the right of the combo if we're invoked to create a new preset.
- getChildView("note")->setVisible(!new_preset);
-
- // Switch between the sky presets combobox and preset name input field.
- mSkyPresetCombo->setVisible(!new_preset);
- mSkyPresetNameEditor->setVisible(new_preset);
-
- reset();
-}
-
-// virtual
-void LLFloaterEditSky::onClose(bool app_quitting)
-{
- if (!app_quitting) // there's no point to change environment if we're quitting
- {
- LLEnvironment::instance().clearEnvironment(LLEnvironment::ENV_EDIT);
- LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL);
- }
-}
-
-// virtual
-void LLFloaterEditSky::draw()
-{
- syncControls();
- LLFloater::draw();
-}
-
-void LLFloaterEditSky::initCallbacks(void)
-{
- // *TODO: warn user if a region environment update comes while we're editing a region sky preset.
-
- mSkyPresetNameEditor->setKeystrokeCallback(boost::bind(&LLFloaterEditSky::onSkyPresetNameEdited, this), NULL);
- mSkyPresetCombo->setCommitCallback(boost::bind(&LLFloaterEditSky::onSkyPresetSelected, this));
- mSkyPresetCombo->setTextEntryCallback(boost::bind(&LLFloaterEditSky::onSkyPresetNameEdited, this));
-
- mSaveButton->setCommitCallback(boost::bind(&LLFloaterEditSky::onBtnSave, this));
- getChild<LLButton>("cancel")->setCommitCallback(boost::bind(&LLFloaterEditSky::onBtnCancel, this));
-
- // Connect to region info updates.
- LLRegionInfoModel::instance().setUpdateCallback(boost::bind(&LLFloaterEditSky::onRegionInfoUpdate, this));
-
- //-------------------------------------------------------------------------
-// LEGACY_ATMOSPHERICS
- // ambient
- getChild<LLUICtrl>("WLAmbient")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlMoved, this, _1, &mSkyAdapter->mAmbient));
-
- // blue horizon/density
- getChild<LLUICtrl>("WLBlueHorizon")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlMoved, this, _1, &mSkyAdapter->mBlueHorizon));
- getChild<LLUICtrl>("WLBlueDensity")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlMoved, this, _1, &mSkyAdapter->mBlueDensity));
-
- // haze density, horizon, mult, and altitude
- getChild<LLUICtrl>("WLHazeDensity")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &mSkyAdapter->mHazeDensity));
- getChild<LLUICtrl>("WLHazeHorizon")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &mSkyAdapter->mHazeHorizon));
- getChild<LLUICtrl>("WLDensityMult")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &mSkyAdapter->mDensityMult));
- getChild<LLUICtrl>("WLDistanceMult")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &mSkyAdapter->mDistanceMult));
- getChild<LLUICtrl>("WLMaxAltitude")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &mSkyAdapter->mMaxAlt));
-
- // sunlight
- getChild<LLUICtrl>("WLSunlight")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlMoved, this, _1, &mSkyAdapter->mSunlight));
-
- // glow
- getChild<LLUICtrl>("WLGlowR")->setCommitCallback(boost::bind(&LLFloaterEditSky::onGlowRMoved, this, _1, &mSkyAdapter->mGlow));
- getChild<LLUICtrl>("WLGlowB")->setCommitCallback(boost::bind(&LLFloaterEditSky::onGlowBMoved, this, _1, &mSkyAdapter->mGlow));
-
- // time of day
-// getChild<LLUICtrl>("WLSunPos")->setCommitCallback(boost::bind(&LLFloaterEditSky::onSunMoved, this, _1, &mSkyAdapter->mLightnorm)); // multi-slider
-// getChild<LLTimeCtrl>("WLDayTime")->setCommitCallback(boost::bind(&LLFloaterEditSky::onTimeChanged, this)); // time ctrl
-// getChild<LLUICtrl>("WLEastAngle")->setCommitCallback(boost::bind(&LLFloaterEditSky::onSunMoved, this, _1, &mSkyAdapter->mLightnorm));
- getChild<LLJoystickQuaternion>("WLSunRotation")->setCommitCallback(boost::bind(&LLFloaterEditSky::onSunRotationChanged, this));
- getChild<LLJoystickQuaternion>("WLMoonRotation")->setCommitCallback(boost::bind(&LLFloaterEditSky::onMoonRotationChanged, this));
-
- // Clouds
-
- // Cloud Color
- getChild<LLUICtrl>("WLCloudColor")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlMoved, this, _1, &mSkyAdapter->mCloudColor));
-
- // Cloud
- getChild<LLUICtrl>("WLCloudX")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlRMoved, this, _1, &mSkyAdapter->mCloudMain));
- getChild<LLUICtrl>("WLCloudY")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlGMoved, this, _1, &mSkyAdapter->mCloudMain));
- getChild<LLUICtrl>("WLCloudDensity")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlBMoved, this, _1, &mSkyAdapter->mCloudMain));
-
- // Cloud Detail
- getChild<LLUICtrl>("WLCloudDetailX")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlRMoved, this, _1, &mSkyAdapter->mCloudDetail));
- getChild<LLUICtrl>("WLCloudDetailY")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlGMoved, this, _1, &mSkyAdapter->mCloudDetail));
- getChild<LLUICtrl>("WLCloudDetailDensity")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlBMoved, this, _1, &mSkyAdapter->mCloudDetail));
-
- // Cloud extras
- getChild<LLUICtrl>("WLCloudCoverage")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &mSkyAdapter->mCloudCoverage));
- getChild<LLUICtrl>("WLCloudScale")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &mSkyAdapter->mCloudScale));
- getChild<LLUICtrl>("WLCloudScrollX")->setCommitCallback(boost::bind(&LLFloaterEditSky::onCloudScrollXMoved, this, _1));
- getChild<LLUICtrl>("WLCloudScrollY")->setCommitCallback(boost::bind(&LLFloaterEditSky::onCloudScrollYMoved, this, _1));
-
-
- // Dome
- getChild<LLUICtrl>("WLGamma")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &mSkyAdapter->mWLGamma));
- getChild<LLUICtrl>("WLStarAlpha")->setCommitCallback(boost::bind(&LLFloaterEditSky::onStarAlphaMoved, this, _1));
-}
-
-//=================================================================================================
-
-void LLFloaterEditSky::syncControls()
-{
- LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky();
- mEditSettings = psky;
-
- std::string name = psky->getName();
-
- mSkyPresetNameEditor->setText(name);
- mSkyPresetCombo->setValue(name);
-
-// LEGACY_ATMOSPHERICS
- // ambient
- mSkyAdapter->mAmbient.setColor3( psky->getAmbientColor() );
- setColorSwatch("WLAmbient", mSkyAdapter->mAmbient, WL_SUN_AMBIENT_SLIDER_SCALE);
-
- // blue horizon / density
- mSkyAdapter->mBlueHorizon.setColor3( psky->getBlueHorizon() );
- setColorSwatch("WLBlueHorizon", mSkyAdapter->mBlueHorizon, WL_BLUE_HORIZON_DENSITY_SCALE);
- mSkyAdapter->mBlueDensity.setColor3( psky->getBlueDensity() );
- setColorSwatch("WLBlueDensity", mSkyAdapter->mBlueDensity, WL_BLUE_HORIZON_DENSITY_SCALE);
-
- // haze density, horizon, mult, and altitude
- mSkyAdapter->mHazeDensity = psky->getHazeDensity();
- childSetValue("WLHazeDensity", (F32) mSkyAdapter->mHazeDensity);
- mSkyAdapter->mHazeHorizon = psky->getHazeHorizon();
- childSetValue("WLHazeHorizon", (F32) mSkyAdapter->mHazeHorizon);
- mSkyAdapter->mDensityMult = psky->getDensityMultiplier();
- childSetValue("WLDensityMult", ((F32) mSkyAdapter->mDensityMult) * mSkyAdapter->mDensityMult.getMult());
- mSkyAdapter->mMaxAlt = psky->getMaxY();
- mSkyAdapter->mDistanceMult = psky->getDistanceMultiplier();
- childSetValue("WLDistanceMult", (F32) mSkyAdapter->mDistanceMult);
- childSetValue("WLMaxAltitude", (F32) mSkyAdapter->mMaxAlt);
-
- // Lighting
-
- // sunlight
- mSkyAdapter->mSunlight.setColor3( psky->getSunlightColor() );
- setColorSwatch("WLSunlight", mSkyAdapter->mSunlight, WL_SUN_AMBIENT_SLIDER_SCALE);
-
- // glow
- mSkyAdapter->mGlow.setColor3( psky->getGlow() );
- childSetValue("WLGlowR", 2 - mSkyAdapter->mGlow.getRed() / 20.0f);
- childSetValue("WLGlowB", -mSkyAdapter->mGlow.getBlue() / 5.0f);
-
-
-
-// LLSettingsSky::azimalt_t azal = psky->getSunRotationAzAl();
-//
-// F32 time24 = sun_pos_to_time24(azal.second / F_TWO_PI);
-// getChild<LLMultiSliderCtrl>("WLSunPos")->setCurSliderValue(time24, TRUE);
-// getChild<LLTimeCtrl>("WLDayTime")->setTime24(time24);
-// childSetValue("WLEastAngle", azal.first / F_TWO_PI);
- getChild<LLJoystickQuaternion>("WLSunRotation")->setRotation(psky->getSunRotation());
- getChild<LLJoystickQuaternion>("WLMoonRotation")->setRotation(psky->getMoonRotation());
-
- // Clouds
-
- // Cloud Color
- mSkyAdapter->mCloudColor.setColor3( psky->getCloudColor() );
- setColorSwatch("WLCloudColor", mSkyAdapter->mCloudColor, WL_CLOUD_SLIDER_SCALE);
-
- // Cloud
- mSkyAdapter->mCloudMain.setColor3( psky->getCloudPosDensity1() );
- childSetValue("WLCloudX", mSkyAdapter->mCloudMain.getRed());
- childSetValue("WLCloudY", mSkyAdapter->mCloudMain.getGreen());
- childSetValue("WLCloudDensity", mSkyAdapter->mCloudMain.getBlue());
-
- // Cloud Detail
- mSkyAdapter->mCloudDetail.setColor3( psky->getCloudPosDensity2() );
- childSetValue("WLCloudDetailX", mSkyAdapter->mCloudDetail.getRed());
- childSetValue("WLCloudDetailY", mSkyAdapter->mCloudDetail.getGreen());
- childSetValue("WLCloudDetailDensity", mSkyAdapter->mCloudDetail.getBlue());
-
- // Cloud extras
- mSkyAdapter->mCloudCoverage = psky->getCloudShadow();
- mSkyAdapter->mCloudScale = psky->getCloudScale();
- childSetValue("WLCloudCoverage", (F32) mSkyAdapter->mCloudCoverage);
- childSetValue("WLCloudScale", (F32) mSkyAdapter->mCloudScale);
-
- // cloud scrolling
- LLVector2 scroll_rate = psky->getCloudScrollRate();
-
- // LAPRAS: These should go away...
- childDisable("WLCloudLockX");
- childDisable("WLCloudLockY");
-
- // disable if locked, enable if not
- childEnable("WLCloudScrollX");
- childEnable("WLCloudScrollY");
-
- // *HACK cloud scrolling is off my an additive of 10
- childSetValue("WLCloudScrollX", scroll_rate[0] - 10.0f);
- childSetValue("WLCloudScrollY", scroll_rate[1] - 10.0f);
-
- // Tweak extras
-
- mSkyAdapter->mWLGamma = psky->getGamma();
- childSetValue("WLGamma", (F32) mSkyAdapter->mWLGamma);
-
- childSetValue("WLStarAlpha", psky->getStarBrightness());
-}
-
-void LLFloaterEditSky::setColorSwatch(const std::string& name, const WLColorControl& from_ctrl, F32 k)
-{
- // Set the value, dividing it by <k> first.
- LLColor4 color = from_ctrl.getColor4();
- getChild<LLColorSwatchCtrl>(name)->set(color / k);
-}
-
-// color control callbacks
-void LLFloaterEditSky::onColorControlMoved(LLUICtrl* ctrl, WLColorControl* color_ctrl)
-{
- LLColorSwatchCtrl* swatch = static_cast<LLColorSwatchCtrl*>(ctrl);
- LLColor4 color_vec(swatch->get().mV);
-
- // Multiply RGB values by the appropriate factor.
- F32 k = WL_CLOUD_SLIDER_SCALE;
- if (color_ctrl->getIsSunOrAmbientColor())
- {
- k = WL_SUN_AMBIENT_SLIDER_SCALE;
- }
- else if (color_ctrl->getIsBlueHorizonOrDensity())
- {
- k = WL_BLUE_HORIZON_DENSITY_SCALE;
- }
-
- color_vec *= k; // intensity isn't affected by the multiplication
-
- // Set intensity to maximum of the RGB values.
- color_vec.mV[3] = color_max(color_vec);
-
- // Apply the new RGBI value.
- color_ctrl->setColor4(color_vec);
- color_ctrl->update(mEditSettings);
-}
-
-void LLFloaterEditSky::onColorControlRMoved(LLUICtrl* ctrl, void* userdata)
-{
- LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
- WLColorControl* color_ctrl = static_cast<WLColorControl *>(userdata);
-
- F32 red_value = sldr_ctrl->getValueF32();
- F32 k = 1.0f;
-
- if (color_ctrl->getIsSunOrAmbientColor())
- {
- k = WL_SUN_AMBIENT_SLIDER_SCALE;
- }
- if (color_ctrl->getIsBlueHorizonOrDensity())
- {
- k = WL_BLUE_HORIZON_DENSITY_SCALE;
- }
- color_ctrl->setRed(red_value * k);
-
- adjustIntensity(color_ctrl, red_value, k);
- color_ctrl->update(mEditSettings);
-}
-
-void LLFloaterEditSky::onColorControlGMoved(LLUICtrl* ctrl, void* userdata)
-{
- LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
- WLColorControl* color_ctrl = static_cast<WLColorControl *>(userdata);
-
- F32 green_value = sldr_ctrl->getValueF32();
- F32 k = 1.0f;
-
- if (color_ctrl->getIsSunOrAmbientColor())
- {
- k = WL_SUN_AMBIENT_SLIDER_SCALE;
- }
- if (color_ctrl->getIsBlueHorizonOrDensity())
- {
- k = WL_BLUE_HORIZON_DENSITY_SCALE;
- }
- color_ctrl->setGreen(green_value * k);
-
- adjustIntensity(color_ctrl, green_value, k);
- color_ctrl->update(mEditSettings);
-}
-
-void LLFloaterEditSky::onColorControlBMoved(LLUICtrl* ctrl, void* userdata)
-{
- LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
- WLColorControl* color_ctrl = static_cast<WLColorControl *>(userdata);
-
- F32 blue_value = sldr_ctrl->getValueF32();
- F32 k = 1.0f;
-
- if (color_ctrl->getIsSunOrAmbientColor())
- {
- k = WL_SUN_AMBIENT_SLIDER_SCALE;
- }
- if (color_ctrl->getIsBlueHorizonOrDensity())
- {
- k = WL_BLUE_HORIZON_DENSITY_SCALE;
- }
- color_ctrl->setBlue(blue_value * k);
-
- adjustIntensity(color_ctrl, blue_value, k);
- color_ctrl->update(mEditSettings);
-}
-
-void LLFloaterEditSky::adjustIntensity(WLColorControl *ctrl, F32 val, F32 scale)
-{
- if (ctrl->getHasSliderName())
- {
- LLColor4 color = ctrl->getColor4();
- F32 i = color_max(color) / scale;
- ctrl->setIntensity(i);
- std::string name = ctrl->getSliderName();
- name.append("I");
-
- childSetValue(name, i);
- }
-}
-
-
-/// GLOW SPECIFIC CODE
-void LLFloaterEditSky::onGlowRMoved(LLUICtrl* ctrl, void* userdata)
-{
-
- LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
- WLColorControl* color_ctrl = static_cast<WLColorControl *>(userdata);
-
- // scaled by 20
- color_ctrl->setRed((2 - sldr_ctrl->getValueF32()) * 20);
-
- color_ctrl->update(mEditSettings);
-}
-
-/// \NOTE that we want NEGATIVE (-) B
-void LLFloaterEditSky::onGlowBMoved(LLUICtrl* ctrl, void* userdata)
-{
- LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
- WLColorControl* color_ctrl = static_cast<WLColorControl *>(userdata);
-
- /// \NOTE that we want NEGATIVE (-) B and NOT by 20 as 20 is too big
- color_ctrl->setBlue(-sldr_ctrl->getValueF32() * 5);
-
- color_ctrl->update(mEditSettings);
-}
-
-void LLFloaterEditSky::onFloatControlMoved(LLUICtrl* ctrl, void* userdata)
-{
- LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
- WLFloatControl * floatControl = static_cast<WLFloatControl *>(userdata);
-
- floatControl->setValue(sldr_ctrl->getValueF32() / floatControl->getMult());
-
- floatControl->update(mEditSettings);
-}
-
-
-// Lighting callbacks
-
-// time of day
-void LLFloaterEditSky::onSunMoved(LLUICtrl* ctrl, void* userdata)
-{
- LLMultiSliderCtrl* sun_msldr = getChild<LLMultiSliderCtrl>("WLSunPos");
- LLSliderCtrl* east_sldr = getChild<LLSliderCtrl>("WLEastAngle");
- LLTimeCtrl* time_ctrl = getChild<LLTimeCtrl>("WLDayTime");
- WLColorControl* color_ctrl = static_cast<WLColorControl *>(userdata);
-
- F32 time24 = sun_msldr->getCurSliderValue();
- time_ctrl->setTime24(time24); // sync the time ctrl with the new sun position
-
- // get the two angles
- F32 azimuth = F_TWO_PI * east_sldr->getValueF32();
- F32 altitude = F_TWO_PI * time24_to_sun_pos(time24);
- mEditSettings->setSunRotation(azimuth, altitude);
- mEditSettings->setMoonRotation(azimuth + F_PI, -altitude);
-
- LLVector4 sunnorm( mEditSettings->getSunDirection(), 1.f );
-
- color_ctrl->update(mEditSettings);
-}
-
-void LLFloaterEditSky::onTimeChanged()
-{
- F32 time24 = getChild<LLTimeCtrl>("WLDayTime")->getTime24();
- getChild<LLMultiSliderCtrl>("WLSunPos")->setCurSliderValue(time24, TRUE);
- onSunMoved(getChild<LLUICtrl>("WLSunPos"), &(mSkyAdapter->mLightnorm));
-}
-
-void LLFloaterEditSky::onSunRotationChanged()
-{
- LLJoystickQuaternion* sun_spinner = getChild<LLJoystickQuaternion>("WLSunRotation");
- LLQuaternion sunrot(sun_spinner->getRotation());
-
- mEditSettings->setSunRotation(sunrot);
-}
-
-void LLFloaterEditSky::onMoonRotationChanged()
-{
- LLJoystickQuaternion* moon_spinner = getChild<LLJoystickQuaternion>("WLMoonRotation");
- LLQuaternion moonrot(moon_spinner->getRotation());
-
- mEditSettings->setMoonRotation(moonrot);
-}
-
-void LLFloaterEditSky::onStarAlphaMoved(LLUICtrl* ctrl)
-{
- LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
-
- mEditSettings->setStarBrightness(sldr_ctrl->getValueF32());
-}
-
-// Clouds
-void LLFloaterEditSky::onCloudScrollXMoved(LLUICtrl* ctrl)
-{
- LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
- // *HACK all cloud scrolling is off by an additive of 10.
- mEditSettings->setCloudScrollRateX(sldr_ctrl->getValueF32() + 10.0f);
-}
-
-void LLFloaterEditSky::onCloudScrollYMoved(LLUICtrl* ctrl)
-{
- LLSliderCtrl* sldr_ctrl = static_cast<LLSliderCtrl*>(ctrl);
-
- // *HACK all cloud scrolling is off by an additive of 10.
- mEditSettings->setCloudScrollRateY(sldr_ctrl->getValueF32() + 10.0f);
-}
-
-//=================================================================================================
-
-void LLFloaterEditSky::reset()
-{
- if (isNewPreset())
- {
- mSkyPresetNameEditor->setValue(LLSD());
- mSaveButton->setEnabled(FALSE); // will be enabled as soon as users enters a name
- }
- else
- {
- refreshSkyPresetsList();
-
- // Disable controls until a sky preset to edit is selected.
- enableEditing(false);
- }
-}
-
-bool LLFloaterEditSky::isNewPreset() const
-{
- return mKey.asString() == "new";
-}
-
-void LLFloaterEditSky::refreshSkyPresetsList()
-{
- mSkyPresetCombo->removeall();
-
- LLEnvironment::list_name_id_t list = LLEnvironment::instance().getSkyList();
-
- for (LLEnvironment::list_name_id_t::iterator it = list.begin(); it != list.end(); ++it)
- {
- mSkyPresetCombo->add((*it).first, LLSDArray((*it).first)((*it).second));
- }
-
- mSkyPresetCombo->setLabel(getString("combo_label"));
-}
-
-void LLFloaterEditSky::enableEditing(bool enable)
-{
- // Enable/disable the tab and their contents.
- LLTabContainer* tab_container = getChild<LLTabContainer>("WindLight Tabs");
- tab_container->setEnabled(enable);
- for (S32 i = 0; i < tab_container->getTabCount(); ++i)
- {
- tab_container->enableTabButton(i, enable);
- tab_container->getPanelByIndex(i)->setCtrlsEnabled(enable);
- }
-
- // Enable/disable saving.
- mSaveButton->setEnabled(enable);
- mMakeDefaultCheckBox->setEnabled(enable);
-}
-
-void LLFloaterEditSky::saveRegionSky()
-{
-#if 0
- LLWLParamKey key(getSelectedSkyPreset());
- llassert(key.scope == LLEnvKey::SCOPE_REGION);
-
- LL_DEBUGS("Windlight") << "Saving region sky preset: " << key.name << LL_ENDL;
- LLWLParamManager& wl_mgr = LLWLParamManager::instance();
- wl_mgr.mCurParams.mName = key.name;
- wl_mgr.setParamSet(key, wl_mgr.mCurParams);
-
- // *TODO: save to cached region settings.
- LL_WARNS("Windlight") << "Saving region sky is not fully implemented yet" << LL_ENDL;
-#endif
-}
-
-std::string LLFloaterEditSky::getSelectedPresetName() const
-{
- std::string name;
- if (mSkyPresetNameEditor->getVisible())
- {
- name = mSkyPresetNameEditor->getText();
- }
- else
- {
- LLSD combo_val = mSkyPresetCombo->getValue();
- name = combo_val[0].asString();
- }
-
- return name;
-}
-
-void LLFloaterEditSky::onSkyPresetNameEdited()
-{
- std::string name = mSkyPresetNameEditor->getText();
- LLSettingsWater::ptr_t psky = LLEnvironment::instance().getCurrentWater();
-
- psky->setName(name);
-}
-
-void LLFloaterEditSky::onSkyPresetSelected()
-{
- std::string name;
-
- name = getSelectedPresetName();
-
- LLSettingsSky::ptr_t psky = LLEnvironment::instance().findSkyByName(name);
-
- if (!psky)
- {
- LL_WARNS("WATEREDIT") << "Could not find water preset" << LL_ENDL;
- enableEditing(false);
- return;
- }
-
- psky = psky->buildClone();
- LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_EDIT, psky);
- mEditSettings = psky;
-
- syncControls();
- enableEditing(true);
-
-}
-
-bool LLFloaterEditSky::onSaveAnswer(const LLSD& notification, const LLSD& response)
-{
- S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
-
- // If they choose save, do it. Otherwise, don't do anything
- if (option == 0)
- {
- onSaveConfirmed();
- }
-
- return false;
-}
-
-void LLFloaterEditSky::onSaveConfirmed()
-{
- // Save currently displayed water params to the selected preset.
- std::string name = mEditSettings->getName();
-
- LL_DEBUGS("Windlight") << "Saving sky preset " << name << LL_ENDL;
-
- LLEnvironment::instance().addSky(mEditSettings);
-
- // Change preference if requested.
- if (mMakeDefaultCheckBox->getEnabled() && mMakeDefaultCheckBox->getValue())
- {
- LL_DEBUGS("Windlight") << name << " is now the new preferred sky preset" << LL_ENDL;
- LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, mEditSettings);
- }
-
- closeFloater();
-}
-
-void LLFloaterEditSky::onBtnSave()
-{
- LLEnvironment::instance().addSky(mEditSettings);
- LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, mEditSettings);
-
- closeFloater();
-}
-
-void LLFloaterEditSky::onBtnCancel()
-{
- closeFloater();
-}
-
-void LLFloaterEditSky::onSkyPresetListChange()
-{
- refreshSkyPresetsList();
-}
-
-void LLFloaterEditSky::onRegionSettingsChange()
-{
-#if 0
- // If creating a new sky, don't bother.
- if (isNewPreset())
- {
- return;
- }
-
- if (getSelectedSkyPreset().scope == LLEnvKey::SCOPE_REGION) // if editing a region sky
- {
- // reset the floater to its initial state
- reset();
-
- // *TODO: Notify user?
- }
- else // editing a local sky
- {
- refreshSkyPresetsList();
- }
-#endif
-}
-
-void LLFloaterEditSky::onRegionInfoUpdate()
-{
-#if 0
- bool can_edit = true;
-
- // If we've selected a region sky preset for editing.
- if (getSelectedSkyPreset().scope == LLEnvKey::SCOPE_REGION)
- {
- // check whether we have the access
- can_edit = LLEnvManagerNew::canEditRegionSettings();
- }
-
- enableEditing(can_edit);
-#endif
-}
-#endif
-
diff --git a/indra/newview/llfloaterfixedenvironment.h b/indra/newview/llfloaterfixedenvironment.h
index 590be08169..22ce167244 100644
--- a/indra/newview/llfloaterfixedenvironment.h
+++ b/indra/newview/llfloaterfixedenvironment.h
@@ -29,6 +29,7 @@
#include "llfloater.h"
#include "llsettingsbase.h"
+#include "llflyoutcombobtn.h"
class LLTabContainer;
class LLButton;
@@ -43,6 +44,7 @@ class LLFloaterFixedEnvironment : public LLFloater
public:
LLFloaterFixedEnvironment(const LLSD &key);
+ ~LLFloaterFixedEnvironment();
virtual BOOL postBuild() override;
@@ -65,88 +67,24 @@ protected:
virtual void doLoadFromInventory() = 0;
virtual void doImportFromDisk() = 0;
- virtual void doApplyFixedSettings() = 0;
+ virtual void doApplyCreateNewInventory();
+ virtual void doApplyUpdateInventory();
+ virtual void doApplyEnvironment(const std::string &where);
bool canUseInventory() const;
+ bool canApplyRegion() const;
+ bool canApplyParcel() const;
+
+ LLFlyoutComboBtn * mFlyoutControl;
private:
void onNameChanged(const std::string &name);
void onButtonLoad();
void onButtonImport();
- void onButtonApply();
+ void onButtonApply(LLUICtrl *ctrl, const LLSD &data);
void onButtonCancel();
-#if 0
-
- /*virtual*/ BOOL postBuild();
- /*virtual*/ void onOpen(const LLSD& key);
- /*virtual*/ void onClose(bool app_quitting);
- /*virtual*/ void draw();
-
-
- //-- WL stuff begins ------------------------------------------------------
-
- void syncControls(); /// sync up sliders with parameters
-
- void setColorSwatch(const std::string& name, const WLColorControl& from_ctrl, F32 k);
-
- // general purpose callbacks for dealing with color controllers
- void onColorControlMoved(LLUICtrl* ctrl, WLColorControl* color_ctrl);
- void onColorControlRMoved(LLUICtrl* ctrl, void* userdata);
- void onColorControlGMoved(LLUICtrl* ctrl, void* userdata);
- void onColorControlBMoved(LLUICtrl* ctrl, void* userdata);
- void onFloatControlMoved(LLUICtrl* ctrl, void* userdata);
-
- void adjustIntensity(WLColorControl *ctrl, F32 color, F32 scale);
-
- // lighting callbacks for glow
- void onGlowRMoved(LLUICtrl* ctrl, void* userdata);
- void onGlowBMoved(LLUICtrl* ctrl, void* userdata);
-
- // lighting callbacks for sun
- void onSunMoved(LLUICtrl* ctrl, void* userdata);
- void onTimeChanged();
-
- void onSunRotationChanged();
- void onMoonRotationChanged();
-
- // for handling when the star slider is moved to adjust the alpha
- void onStarAlphaMoved(LLUICtrl* ctrl);
-
- // handle cloud scrolling
- void onCloudScrollXMoved(LLUICtrl* ctrl);
- void onCloudScrollYMoved(LLUICtrl* ctrl);
-
- //-- WL stuff ends --------------------------------------------------------
-
- void reset(); /// reset the floater to its initial state
- bool isNewPreset() const;
- void refreshSkyPresetsList();
- void enableEditing(bool enable);
- void saveRegionSky();
- std::string getSelectedPresetName() const;
-
- void onSkyPresetNameEdited();
- void onSkyPresetSelected();
- bool onSaveAnswer(const LLSD& notification, const LLSD& response);
- void onSaveConfirmed();
-
- void onBtnSave();
- void onBtnCancel();
-
- void onSkyPresetListChange();
- void onRegionSettingsChange();
- void onRegionInfoUpdate();
-
- LLSettingsSky::ptr_t mEditSettings;
-
- LLLineEditor* mSkyPresetNameEditor;
- LLComboBox* mSkyPresetCombo;
- LLCheckBoxCtrl* mMakeDefaultCheckBox;
- LLButton* mSaveButton;
- LLSkySettingsAdapterPtr mSkyAdapter;
-#endif
};
class LLFloaterFixedEnvironmentWater : public LLFloaterFixedEnvironment
@@ -166,7 +104,6 @@ protected:
virtual void doLoadFromInventory() override;
virtual void doImportFromDisk() override;
- virtual void doApplyFixedSettings() override;
private:
};
@@ -188,7 +125,6 @@ protected:
virtual void doLoadFromInventory() override;
virtual void doImportFromDisk() override;
- virtual void doApplyFixedSettings() override;
private:
};
diff --git a/indra/newview/llflyoutcombobtn.cpp b/indra/newview/llflyoutcombobtn.cpp
new file mode 100644
index 0000000000..efe76b5653
--- /dev/null
+++ b/indra/newview/llflyoutcombobtn.cpp
@@ -0,0 +1,127 @@
+/**
+ * @file llsaveoutfitcombobtn.cpp
+ * @brief Represents outfit save/save as combo button.
+ *
+ * $LicenseInfo:firstyear=2010&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llflyoutcombobtn.h"
+#include "llviewermenu.h"
+
+LLFlyoutComboBtn::LLFlyoutComboBtn(LLPanel* parent, const std::string &action_button, const std::string &flyout_button, const std::string &menu_file) :
+ mParent(parent),
+ mActionButton(action_button),
+ mFlyoutButton(flyout_button)
+{
+ // register action mapping before creating menu
+ LLUICtrl::CommitCallbackRegistry::ScopedRegistrar save_registar;
+ save_registar.add("FlyoutCombo.Button.Action", [this](LLUICtrl *ctrl, const LLSD &data) { onFlyoutItemSelected(ctrl, data); });
+
+ mParent->childSetAction(flyout_button, [this](LLUICtrl *ctrl, const LLSD &data) { onFlyoutButton(ctrl, data); });
+ mParent->childSetAction(action_button, [this](LLUICtrl *ctrl, const LLSD &data) { onFlyoutAction(ctrl, data); });
+
+ mFlyoutMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu> (menu_file, gMenuHolder,
+ LLViewerMenuHolderGL::child_registry_t::instance());
+
+ // select the first item in the list.
+ setSelectedItem(0);
+}
+
+void LLFlyoutComboBtn::setAction(LLUICtrl::commit_callback_t cb)
+{
+ mActionSignal.connect(cb);
+}
+
+
+U32 LLFlyoutComboBtn::getItemCount()
+{
+ return mFlyoutMenu->getItemCount();
+}
+
+void LLFlyoutComboBtn::setSelectedItem(S32 itemno)
+{
+ LLMenuItemGL *pitem = mFlyoutMenu->getItem(itemno);
+ setSelectedItem(pitem);
+}
+
+void LLFlyoutComboBtn::setSelectedItem(const std::string &item)
+{
+ LLMenuItemGL *pitem = mFlyoutMenu->getChild<LLMenuItemGL>(item, false);
+ setSelectedItem(pitem);
+}
+
+void LLFlyoutComboBtn::setSelectedItem(LLMenuItemGL *pitem)
+{
+ if (!pitem)
+ {
+ LL_WARNS("INTERFACE") << "NULL item selected" << LL_ENDL;
+ return;
+ }
+
+ mSelectedName = pitem->getName();
+
+ LLButton *action_button = mParent->getChild<LLButton>(mActionButton);
+ action_button->setEnabled(pitem->getEnabled());
+ action_button->setLabel(pitem->getLabel());
+}
+
+void LLFlyoutComboBtn::setMenuItemEnabled(const std::string& item, bool enabled)
+{
+ mFlyoutMenu->setItemEnabled(item, enabled);
+ if (item == mSelectedName)
+ {
+ mParent->getChildView(mActionButton)->setEnabled(enabled);
+ }
+}
+
+void LLFlyoutComboBtn::setShownBtnEnabled(bool enabled)
+{
+ mParent->getChildView(mActionButton)->setEnabled(enabled);
+}
+
+void LLFlyoutComboBtn::onFlyoutButton(LLUICtrl *ctrl, const LLSD &data)
+{
+ S32 x, y;
+ LLUI::getMousePositionLocal(mParent, &x, &y);
+
+ mFlyoutMenu->updateParent(LLMenuGL::sMenuContainer);
+ LLMenuGL::showPopup(mParent, mFlyoutMenu, x, y);
+}
+
+void LLFlyoutComboBtn::onFlyoutItemSelected(LLUICtrl *ctrl, const LLSD &data)
+{
+ LLMenuItemGL *pmenuitem = static_cast<LLMenuItemGL*>(ctrl);
+ setSelectedItem(pmenuitem);
+
+ onFlyoutAction(pmenuitem, data);
+}
+
+void LLFlyoutComboBtn::onFlyoutAction(LLUICtrl *ctrl, const LLSD &data)
+{
+ LLMenuItemGL *pmenuitem = mFlyoutMenu->getChild<LLMenuItemGL>(mSelectedName);
+
+ if (!mActionSignal.empty())
+ mActionSignal(pmenuitem, data);
+}
+
diff --git a/indra/newview/llflyoutcombobtn.h b/indra/newview/llflyoutcombobtn.h
new file mode 100644
index 0000000000..ebf7564422
--- /dev/null
+++ b/indra/newview/llflyoutcombobtn.h
@@ -0,0 +1,71 @@
+/**
+ * @file llsaveoutfitcombobtn.h
+ * @brief Represents outfit save/save as combo button.
+ *
+ * $LicenseInfo:firstyear=2010&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLSAVECOMBOBTN_H
+#define LL_LLSAVECOMBOBTN_H
+
+/*TODO: Make this button generic */
+
+class LLButton;
+
+#include "lltoggleablemenu.h"
+
+/**
+ * Represents outfit Save/Save As combo button.
+ */
+class LLFlyoutComboBtn
+{
+ LOG_CLASS(LLFlyoutComboBtn);
+public:
+ LLFlyoutComboBtn(LLPanel* parent, const std::string &action_button, const std::string &flyout_button, const std::string &menu_file);
+
+ void setMenuItemEnabled(const std::string &item, bool enabled);
+ void setShownBtnEnabled(bool enabled);
+
+ U32 getItemCount();
+ void setSelectedItem(S32 itemno);
+ void setSelectedItem(const std::string &item);
+
+ void setAction(LLUICtrl::commit_callback_t cb);
+
+protected:
+ void onFlyoutButton(LLUICtrl *, const LLSD &);
+ void onFlyoutItemSelected(LLUICtrl *, const LLSD &);
+ void onFlyoutAction(LLUICtrl *, const LLSD &);
+
+ void setSelectedItem(LLMenuItemGL *pitem);
+
+private:
+ LLPanel * mParent;
+ LLToggleableMenu * mFlyoutMenu;
+ std::string mActionButton;
+ std::string mFlyoutButton;
+
+ std::string mSelectedName;
+
+ LLUICtrl::commit_signal_t mActionSignal;
+};
+#endif // LL_LLSAVEOUTFITCOMBOBTN_H
diff --git a/indra/newview/skins/default/xui/en/floater_fixedenvironment.xml b/indra/newview/skins/default/xui/en/floater_fixedenvironment.xml
index 2590bb3410..38ce131dc2 100644
--- a/indra/newview/skins/default/xui/en/floater_fixedenvironment.xml
+++ b/indra/newview/skins/default/xui/en/floater_fixedenvironment.xml
@@ -34,7 +34,7 @@
width="35"
height="20"
font="SansSerif">
- Name:
+ Name:
</text>
<line_editor
follows="left|top"
@@ -83,7 +83,7 @@
<!-- Tabs inserted here in code -->
<!-- -->
<!-- -->
-
+
<!-- -->
</tab_container>
</layout_panel>
@@ -93,25 +93,71 @@
user_resize="false"
height="40"
visible="true">
- <button
+ <layout_stack
+ follows="bottom|left|right"
height="23"
- label="Save"
- follows="left|top"
- font="SansSerif"
- name="btn_commit"
- tool_tip="Load a settings from inventory"
- width="96" />
- <button
- height="23"
- label="Cancel"
- follows="right|top"
- right="-10"
- top_delta="0"
- font="SansSerif"
- name="btn_cancel"
- tool_tip="Load a settings from inventory"
- width="96" />
-
+ layout="topleft"
+ mouse_opaque="false"
+ name="button_bar_ls"
+ left="0"
+ orientation="horizontal"
+ top="0"
+ width="313">
+ <layout_panel
+ follows="bottom|left|right"
+ height="23"
+ layout="bottomleft"
+ left="0"
+ mouse_opaque="false"
+ name="save_btn_lp"
+ auto_resize="true"
+ width="156">
+ <button
+ follows="bottom|left|right"
+ height="23"
+ label="Save"
+ left="1"
+ layout="topleft"
+ name="btn_commit"
+ top="0"
+ width="155" />
+ <button
+ follows="bottom|right"
+ height="23"
+ name="btn_flyout"
+ label=""
+ layout="topleft"
+ left_pad="-20"
+ tab_stop="false"
+ top="0"
+ image_selected="SegmentedBtn_Right_Selected_Press"
+ image_unselected="SegmentedBtn_Right_Off"
+ image_pressed="SegmentedBtn_Right_Press"
+ image_pressed_selected="SegmentedBtn_Right_Selected_Press"
+ image_overlay="Arrow_Small_Up"
+ width="20"/>
+ </layout_panel>
+ <layout_panel
+ follows="bottom|left|right"
+ height="23"
+ layout="bottomleft"
+ left_pad="3"
+ mouse_opaque="false"
+ name="revert_btn_lp"
+ auto_resize="true"
+ width="147">
+ <button
+ follows="bottom|right"
+ height="23"
+ right="-1"
+ label="Cancel"
+ layout="topleft"
+ name="btn_cancel"
+ top="0"
+ tool_tip="Revert to last saved version"
+ width="147" />
+ </layout_panel>
+ </layout_stack>
</layout_panel>
</layout_stack>
</floater>
diff --git a/indra/newview/skins/default/xui/en/menu_save_settings.xml b/indra/newview/skins/default/xui/en/menu_save_settings.xml
new file mode 100644
index 0000000000..fcdd711366
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/menu_save_settings.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<toggleable_menu
+ height="602"
+ layout="topleft"
+ mouse_opaque="false"
+ name="save_settings_menu"
+ width="120">
+ <menu_item_call
+ name="save_settings"
+ label="Save">
+ <menu_item_call.on_click
+ function="FlyoutCombo.Button.Action"
+ userdata="save"/>
+ </menu_item_call>
+ <menu_item_call
+ name="save_as_new_settings"
+ label="Save As">
+ <menu_item_call.on_click
+ function="FlyoutCombo.Button.Action"
+ userdata="saveas" />
+ </menu_item_call>
+ <menu_item_call
+ name="apply_local"
+ label="Apply Locally">
+ <menu_item_call.on_click
+ function="FlyoutCombo.Button.Action"
+ userdata="local" />
+ </menu_item_call>
+ <menu_item_call
+ name="apply_parcel"
+ label="Apply Parcel">
+ <menu_item_call.on_click
+ function="FlyoutCombo.Button.Action"
+ userdata="parcel" />
+ </menu_item_call>
+ <menu_item_call
+ name="apply_region"
+ label="Apply Region">
+ <menu_item_call.on_click
+ function="FlyoutCombo.Button.Action"
+ userdata="region" />
+ </menu_item_call>
+</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
index 3f13cea58e..afce9f6eb5 100644
--- a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
@@ -1,556 +1,556 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<!-- Side tray Outfit Edit panel -->
<panel
- background_visible="true"
- border="false"
- height="600"
- follows="all"
- layout="topleft"
- help_topic="edit_outfit"
- left="0"
- min_height="350"
- name="outfit_edit"
- top="0"
- width="320">
- <string
- name="No Outfit"
- value="No Outfit"/>
- <string
- name="unsaved_changes"
- value="Unsaved Changes"/>
- <string
- name="now_editing"
- value="Now Editing"/>
- <string
- name="folder_view_off"
- value="Hierarchy_View_Disabled"
- translate="false"/>
- <string
- name="folder_view_on"
- value="Hierarchy_View_On"
- translate="false"/>
- <string
- name="list_view_off"
- value="List_View_Disabled"
- translate="false"/>
- <string
- name="list_view_on"
- value="List_View_On"
- translate="false"/>
+ background_visible="true"
+ border="false"
+ height="600"
+ follows="all"
+ layout="topleft"
+ help_topic="edit_outfit"
+ left="0"
+ min_height="350"
+ name="outfit_edit"
+ top="0"
+ width="320">
+ <string
+ name="No Outfit"
+ value="No Outfit"/>
+ <string
+ name="unsaved_changes"
+ value="Unsaved Changes"/>
+ <string
+ name="now_editing"
+ value="Now Editing"/>
+ <string
+ name="folder_view_off"
+ value="Hierarchy_View_Disabled"
+ translate="false"/>
+ <string
+ name="folder_view_on"
+ value="Hierarchy_View_On"
+ translate="false"/>
+ <string
+ name="list_view_off"
+ value="List_View_Disabled"
+ translate="false"/>
+ <string
+ name="list_view_on"
+ value="List_View_On"
+ translate="false"/>
- <panel.string
- name="not_available">
- (N\A)
- </panel.string>
- <panel.string
- name="unknown">
- (unknown)
- </panel.string>
+ <panel.string
+ name="not_available">
+ (N\A)
+ </panel.string>
+ <panel.string
+ name="unknown">
+ (unknown)
+ </panel.string>
- <!-- Wearables filtering strings -->
- <string name="Filter.All" value="All"/>
- <string name="Filter.Clothes/Body" value="Clothes/Body"/>
- <string name="Filter.Objects" value="Objects"/>
- <string name="Filter.Clothing" value="Clothing"/>
- <string name="Filter.Bodyparts" value="Body parts"/>
+ <!-- Wearables filtering strings -->
+ <string name="Filter.All" value="All"/>
+ <string name="Filter.Clothes/Body" value="Clothes/Body"/>
+ <string name="Filter.Objects" value="Objects"/>
+ <string name="Filter.Clothing" value="Clothing"/>
+ <string name="Filter.Bodyparts" value="Body parts"/>
- <string
- name="replace_body_part"
- value="Click to replace your existing shape"/>
+ <string
+ name="replace_body_part"
+ value="Click to replace your existing shape"/>
- <button
- follows="top|left"
- height="24"
- image_hover_unselected="BackButton_Over"
- image_pressed="BackButton_Press"
- image_unselected="BackButton_Off"
- layout="topleft"
- name="back_btn"
- left="5"
- tab_stop="false"
- top="1"
- width="30"
- use_draw_context_alpha="false" />
- <text
- follows="top|left|right"
- font="SansSerifHugeBold"
- height="26"
- layout="topleft"
- left_pad="10"
- name="title"
- text_color="LtGray"
- top="0"
- value="Edit Outfit"
- use_ellipses="true"
- width="275" />
+ <button
+ follows="top|left"
+ height="24"
+ image_hover_unselected="BackButton_Over"
+ image_pressed="BackButton_Press"
+ image_unselected="BackButton_Off"
+ layout="topleft"
+ name="back_btn"
+ left="5"
+ tab_stop="false"
+ top="1"
+ width="30"
+ use_draw_context_alpha="false" />
+ <text
+ follows="top|left|right"
+ font="SansSerifHugeBold"
+ height="26"
+ layout="topleft"
+ left_pad="10"
+ name="title"
+ text_color="LtGray"
+ top="0"
+ value="Edit Outfit"
+ use_ellipses="true"
+ width="275" />
- <!-- "HEADER WITH ICON, STATUS TEXT AND OUTFIT NAME" -->
- <panel
- background_visible="true"
- bg_alpha_color="DkGray2"
- bevel_style="none"
- follows="top|left|right"
- height="40"
- layout="topleft"
- left="6"
- name="header_panel"
- top_pad="5"
- width="311">
- <icon
- follows="left|top"
- height="31"
- image_name="Shirt_Large"
- left="2"
- mouse_opaque="false"
- name="outfit_icon"
- top="2"
- scale_image="true"
- visible="true"
- width="31" />
- <panel
- bevel_style="none"
- follows="top|left|right"
- height="37"
- layout="topleft"
- left_pad="5"
- name="outfit_name_and_status"
- top="2"
- width="270">
- <text
- follows="top|left|right"
- font="SansSerifSmallBold"
- height="13"
- layout="topleft"
- name="status"
- text_color="EmphasisColor"
- top="2"
- value="Now editing..."
- use_ellipses="true"
- width="245" />
- <text
- follows="bottom|left|right"
- font="SansSerifLargeBold"
- height="18"
- layout="topleft"
- name="curr_outfit_name"
- parse_urls="false"
- text_color="LtGray"
- top_pad="2"
- value="[Current Outfit]"
- use_ellipses="true"
- width="245" />
- <loading_indicator
- follows="right|top"
- height="24"
- layout="topleft"
- right="-2"
- name="edit_outfit_loading_indicator"
- top="6"
- width="24" />
- </panel>
- </panel>
+ <!-- "HEADER WITH ICON, STATUS TEXT AND OUTFIT NAME" -->
+ <panel
+ background_visible="true"
+ bg_alpha_color="DkGray2"
+ bevel_style="none"
+ follows="top|left|right"
+ height="40"
+ layout="topleft"
+ left="6"
+ name="header_panel"
+ top_pad="5"
+ width="311">
+ <icon
+ follows="left|top"
+ height="31"
+ image_name="Shirt_Large"
+ left="2"
+ mouse_opaque="false"
+ name="outfit_icon"
+ top="2"
+ scale_image="true"
+ visible="true"
+ width="31" />
+ <panel
+ bevel_style="none"
+ follows="top|left|right"
+ height="37"
+ layout="topleft"
+ left_pad="5"
+ name="outfit_name_and_status"
+ top="2"
+ width="270">
+ <text
+ follows="top|left|right"
+ font="SansSerifSmallBold"
+ height="13"
+ layout="topleft"
+ name="status"
+ text_color="EmphasisColor"
+ top="2"
+ value="Now editing..."
+ use_ellipses="true"
+ width="245" />
+ <text
+ follows="bottom|left|right"
+ font="SansSerifLargeBold"
+ height="18"
+ layout="topleft"
+ name="curr_outfit_name"
+ parse_urls="false"
+ text_color="LtGray"
+ top_pad="2"
+ value="[Current Outfit]"
+ use_ellipses="true"
+ width="245" />
+ <loading_indicator
+ follows="right|top"
+ height="24"
+ layout="topleft"
+ right="-2"
+ name="edit_outfit_loading_indicator"
+ top="6"
+ width="24" />
+ </panel>
+ </panel>
- <!-- LIST OF WEARABLES (CURRENT OUTFIT/ WEARABLES TO ADD) -->
- <!-- *NOTE: border_size is used to calculate space between layout panels and also to calculate resize bar's height.
+ <!-- LIST OF WEARABLES (CURRENT OUTFIT/ WEARABLES TO ADD) -->
+ <!-- *NOTE: border_size is used to calculate space between layout panels and also to calculate resize bar's height.
Required height for dragbar (icon in spec) is 10, so resizebar height should be 10 px.
It is calculated as border_size + 2*UIResizeBarOverlap
-->
- <layout_stack
- animate="true"
- border_size="8"
- clip="false"
- default_tab_group="2"
- follows="all"
- height="465"
- width="313"
- layout="topleft"
- orientation="vertical"
- name="im_panels"
- tab_group="1"
- top_pad="5"
- left="5">
- <layout_panel
- layout="topleft"
- height="187"
- min_height="155"
- name="outfit_wearables_panel"
- width="313"
- auto_resize="true"
- user_resize="true">
+ <layout_stack
+ animate="true"
+ border_size="8"
+ clip="false"
+ default_tab_group="2"
+ follows="all"
+ height="465"
+ width="313"
+ layout="topleft"
+ orientation="vertical"
+ name="im_panels"
+ tab_group="1"
+ top_pad="5"
+ left="5">
+ <layout_panel
+ layout="topleft"
+ height="187"
+ min_height="155"
+ name="outfit_wearables_panel"
+ width="313"
+ auto_resize="true"
+ user_resize="true">
- <layout_stack
- animate="true"
- border_size="0"
- follows="all"
- height="185"
- width="313"
- orientation="vertical"
- layout="topleft"
- name="filter_panels"
- top="0"
- left="0">
- <layout_panel
- auto_resize="true"
- background_visible="false"
- layout="topleft"
- height="154"
- name="add_button_and_combobox"
- width="311"
- visible="true">
+ <layout_stack
+ animate="true"
+ border_size="0"
+ follows="all"
+ height="185"
+ width="313"
+ orientation="vertical"
+ layout="topleft"
+ name="filter_panels"
+ top="0"
+ left="0">
+ <layout_panel
+ auto_resize="true"
+ background_visible="false"
+ layout="topleft"
+ height="154"
+ name="add_button_and_combobox"
+ width="311"
+ visible="true">
- <!-- List containing items from the COF and Base outfit -->
- <panel
- background_visible="false"
- class="cof_wearables"
- filename="panel_cof_wearables.xml"
- follows="all"
- height="129"
- layout="topleft"
- left="1"
- name="cof_wearables_list"
- top="0"
- width="311" />
+ <!-- List containing items from the COF and Base outfit -->
+ <panel
+ background_visible="false"
+ class="cof_wearables"
+ filename="panel_cof_wearables.xml"
+ follows="all"
+ height="129"
+ layout="topleft"
+ left="1"
+ name="cof_wearables_list"
+ top="0"
+ width="311" />
- <button
- follows="left|bottom"
- height="22"
- image_pressed="PushButton_Press"
- image_pressed_selected="PushButton_Selected_Press"
- image_selected="PushButton_Selected_Press"
- is_toggle="true"
- label="Add More..."
- layout="topleft"
- left="2"
- name="show_add_wearables_btn"
- top_pad="2"
- tool_tip="Open/Close"
- width="125" />
+ <button
+ follows="left|bottom"
+ height="22"
+ image_pressed="PushButton_Press"
+ image_pressed_selected="PushButton_Selected_Press"
+ image_selected="PushButton_Selected_Press"
+ is_toggle="true"
+ label="Add More..."
+ layout="topleft"
+ left="2"
+ name="show_add_wearables_btn"
+ top_pad="2"
+ tool_tip="Open/Close"
+ width="125" />
- <combo_box
- follows="left|right|bottom"
- height="22"
- layout="topleft"
- left_pad="5"
- name="list_view_filter_combobox"
- top_delta="0"
- visible="false"
- width="152"/>
- <combo_box
- follows="left|right|bottom"
- height="22"
- layout="topleft"
- left_delta="0"
- name="folder_view_filter_combobox"
- top_delta="0"
- visible="false"
- width="152"/>
+ <combo_box
+ follows="left|right|bottom"
+ height="22"
+ layout="topleft"
+ left_pad="5"
+ name="list_view_filter_combobox"
+ top_delta="0"
+ visible="false"
+ width="152"/>
+ <combo_box
+ follows="left|right|bottom"
+ height="22"
+ layout="topleft"
+ left_delta="0"
+ name="folder_view_filter_combobox"
+ top_delta="0"
+ visible="false"
+ width="152"/>
- <button
- follows="bottom|right"
- height="22"
- image_overlay="Search_Icon"
- image_pressed="PushButton_Press"
- image_pressed_selected="PushButton_Selected_Press"
- image_selected="PushButton_Selected_Press"
- is_toggle="true"
- layout="topleft"
- name="filter_button"
- right="-5"
- top_delta="0"
- visible="false"
- width="20" />
- </layout_panel>
+ <button
+ follows="bottom|right"
+ height="22"
+ image_overlay="Search_Icon"
+ image_pressed="PushButton_Press"
+ image_pressed_selected="PushButton_Selected_Press"
+ image_selected="PushButton_Selected_Press"
+ is_toggle="true"
+ layout="topleft"
+ name="filter_button"
+ right="-5"
+ top_delta="0"
+ visible="false"
+ width="20" />
+ </layout_panel>
- <layout_panel
- auto_resize="false"
- background_visible="true"
- bg_alpha_color="DkGray2"
- height="30"
- name="filter_panel"
- width="311"
- visible="false">
+ <layout_panel
+ auto_resize="false"
+ background_visible="true"
+ bg_alpha_color="DkGray2"
+ height="30"
+ name="filter_panel"
+ width="311"
+ visible="false">
- <filter_editor
- background_image="TextField_Search_Off"
- enabled="true"
- follows="left|right|top"
- label="Filter Inventory Wearables"
- layout="topleft"
- left="5"
- width="290"
- height="25"
- name="look_item_filter"
- search_button_visible="true"
- text_color="black"
- visible="true"/>
+ <filter_editor
+ background_image="TextField_Search_Off"
+ enabled="true"
+ follows="left|right|top"
+ label="Filter Inventory Wearables"
+ layout="topleft"
+ left="5"
+ width="290"
+ height="25"
+ name="look_item_filter"
+ search_button_visible="true"
+ text_color="black"
+ visible="true"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
+ </layout_panel>
+ </layout_stack>
+ </layout_panel>
- <layout_panel background_visible="false"
- bg_alpha_color="DkGray2"
- auto_resize="true"
- height="450"
- min_height="80"
- name="add_wearables_panel"
- width="313"
- tab_group="2"
- user_resize="true"
- visible="false">
+ <layout_panel background_visible="false"
+ bg_alpha_color="DkGray2"
+ auto_resize="true"
+ height="450"
+ min_height="80"
+ name="add_wearables_panel"
+ width="313"
+ tab_group="2"
+ user_resize="true"
+ visible="false">
- <!-- this icon represent dragbar between layout panels.
+ <!-- this icon represent dragbar between layout panels.
This is a workaround implemented in EXT-7255 becouse of an issue with layout stack (EXT-7471) -->
- <icon follows="left|top|right"
- height="10"
- image_name="Dragbar"
- left="0"
- top_pad="-9"
- width="313" />
- <inventory_panel allow_multi_select="true"
- background_visible="false"
- border="false"
- follows="left|top|right|bottom"
- height="418"
- layout="topleft"
- left="0"
- mouse_opaque="false"
- name="folder_view"
- top_pad="0"
- width="313"
- visible="false"/>
- <panel name="filtered_wearables_panel"
- background_opaque="true"
- background_visible="false"
- layout="topleft"
- follows="left|top|right|bottom"
- border="false"
- height="418"
- left="0"
- mouse_opaque="false"
- width="310"
- top_delta="0"
- visible="true">
- <wearable_items_list color="0.107 0.107 0.107 1"
- name="list_view"
- allow_select="true"
- layout="topleft"
- follows="all"
- multi_select="true"
- width="313"
- height="418"
- left="0"
- top="0"/>
- </panel>
- <button follows="bottom|left"
- height="22"
- left="2"
- label="Wear Item"
- layout="topleft"
- name="plus_btn"
- top_pad="5"
- width="130" />
- </layout_panel>
- </layout_stack>
+ <icon follows="left|top|right"
+ height="10"
+ image_name="Dragbar"
+ left="0"
+ top_pad="-9"
+ width="313" />
+ <inventory_panel allow_multi_select="true"
+ background_visible="false"
+ border="false"
+ follows="left|top|right|bottom"
+ height="418"
+ layout="topleft"
+ left="0"
+ mouse_opaque="false"
+ name="folder_view"
+ top_pad="0"
+ width="313"
+ visible="false"/>
+ <panel name="filtered_wearables_panel"
+ background_opaque="true"
+ background_visible="false"
+ layout="topleft"
+ follows="left|top|right|bottom"
+ border="false"
+ height="418"
+ left="0"
+ mouse_opaque="false"
+ width="310"
+ top_delta="0"
+ visible="true">
+ <wearable_items_list color="0.107 0.107 0.107 1"
+ name="list_view"
+ allow_select="true"
+ layout="topleft"
+ follows="all"
+ multi_select="true"
+ width="313"
+ height="418"
+ left="0"
+ top="0"/>
+ </panel>
+ <button follows="bottom|left"
+ height="22"
+ left="2"
+ label="Wear Item"
+ layout="topleft"
+ name="plus_btn"
+ top_pad="5"
+ width="130" />
+ </layout_panel>
+ </layout_stack>
- <!-- BUTTON BAR -->
- <panel
- background_visible="true"
- bevel_style="none"
- follows="bottom|left|right"
- height="27"
- layout="topleft"
- left="5"
- name="no_add_wearables_button_bar"
- top_pad="0"
- width="313">
- <menu_button
- follows="bottom|left"
- height="25"
- image_hover_unselected="Toolbar_Left_Over"
- image_overlay="OptionsMenu_Off"
- image_selected="Toolbar_Left_Selected"
- image_unselected="Toolbar_Left_Off"
- layout="topleft"
- left="0"
- name="gear_menu_btn"
- top="1"
- width="31" />
- <icon
- follows="bottom|left|right"
- height="25"
- image_name="Toolbar_Middle_Off"
- layout="topleft"
- left_pad="1"
- name="dummy_right_icon"
- width="250" />
- <button
- follows="bottom|right"
- height="25"
- image_hover_unselected="Toolbar_Right_Over"
- image_overlay="Shop"
- image_selected="Toolbar_Right_Selected"
- image_unselected="Toolbar_Right_Off"
- layout="topleft"
- left_pad="1"
- name="shop_btn_1"
- top="1"
- tool_tip="Visit the SL Marketplace. You can also select something you are wearing, then click here to see more things like it"
- width="31" />
- </panel>
+ <!-- BUTTON BAR -->
+ <panel
+ background_visible="true"
+ bevel_style="none"
+ follows="bottom|left|right"
+ height="27"
+ layout="topleft"
+ left="5"
+ name="no_add_wearables_button_bar"
+ top_pad="0"
+ width="313">
+ <menu_button
+ follows="bottom|left"
+ height="25"
+ image_hover_unselected="Toolbar_Left_Over"
+ image_overlay="OptionsMenu_Off"
+ image_selected="Toolbar_Left_Selected"
+ image_unselected="Toolbar_Left_Off"
+ layout="topleft"
+ left="0"
+ name="gear_menu_btn"
+ top="1"
+ width="31" />
+ <icon
+ follows="bottom|left|right"
+ height="25"
+ image_name="Toolbar_Middle_Off"
+ layout="topleft"
+ left_pad="1"
+ name="dummy_right_icon"
+ width="250" />
+ <button
+ follows="bottom|right"
+ height="25"
+ image_hover_unselected="Toolbar_Right_Over"
+ image_overlay="Shop"
+ image_selected="Toolbar_Right_Selected"
+ image_unselected="Toolbar_Right_Off"
+ layout="topleft"
+ left_pad="1"
+ name="shop_btn_1"
+ top="1"
+ tool_tip="Visit the SL Marketplace. You can also select something you are wearing, then click here to see more things like it"
+ width="31" />
+ </panel>
- <!-- BUTTON BAR - WEARABLES ADDING MODE -->
- <panel
- background_visible="true"
- bevel_style="none"
- follows="left|right|bottom"
- height="27"
- layout="topleft"
- left="5"
- name="add_wearables_button_bar"
- top_delta="0"
- visible="false"
- width="313">
- <menu_button
- follows="bottom|left"
- height="25"
- image_hover_unselected="Toolbar_Left_Over"
- image_overlay="OptionsMenu_Off"
- image_selected="Toolbar_Left_Selected"
- image_unselected="Toolbar_Left_Off"
- layout="topleft"
- left="0"
- name="wearables_gear_menu_btn"
- top="1"
- width="31" />
- <button
- follows="bottom|left"
- height="25"
- image_hover_unselected="Toolbar_Middle_Over"
- image_overlay="Hierarchy_View_Disabled"
- image_selected="Toolbar_Middle_Selected"
- image_unselected="Toolbar_Middle_Off"
- is_toggle="true"
- layout="topleft"
- left_pad="1"
- name="folder_view_btn"
- top="1"
- width="31" />
- <button
- follows="bottom|left"
- height="25"
- image_hover_unselected="Toolbar_Middle_Over"
- image_overlay="List_View_On"
- image_selected="Toolbar_Middle_Selected"
- image_unselected="Toolbar_Middle_Off"
- is_toggle="true"
- layout="topleft"
- left_pad="1"
- name="list_view_btn"
- top="1"
- width="31" />
- <icon
- follows="bottom|left|right"
- height="25"
- image_name="Toolbar_Middle_Off"
- layout="topleft"
- left_pad="1"
- name="dummy_right_icon"
- width="186" >
- </icon>
- <button
- follows="bottom|right"
- height="25"
- image_hover_unselected="Toolbar_Right_Over"
- image_overlay="Shop"
- image_selected="Toolbar_Right_Selected"
- image_unselected="Toolbar_Right_Off"
- layout="topleft"
- left_pad="1"
- name="shop_btn_2"
- top="1"
- tool_tip="Visit the SL Marketplace. You can also select something you are wearing, then click here to see more things like it"
- width="31" />
- </panel>
+ <!-- BUTTON BAR - WEARABLES ADDING MODE -->
+ <panel
+ background_visible="true"
+ bevel_style="none"
+ follows="left|right|bottom"
+ height="27"
+ layout="topleft"
+ left="5"
+ name="add_wearables_button_bar"
+ top_delta="0"
+ visible="false"
+ width="313">
+ <menu_button
+ follows="bottom|left"
+ height="25"
+ image_hover_unselected="Toolbar_Left_Over"
+ image_overlay="OptionsMenu_Off"
+ image_selected="Toolbar_Left_Selected"
+ image_unselected="Toolbar_Left_Off"
+ layout="topleft"
+ left="0"
+ name="wearables_gear_menu_btn"
+ top="1"
+ width="31" />
+ <button
+ follows="bottom|left"
+ height="25"
+ image_hover_unselected="Toolbar_Middle_Over"
+ image_overlay="Hierarchy_View_Disabled"
+ image_selected="Toolbar_Middle_Selected"
+ image_unselected="Toolbar_Middle_Off"
+ is_toggle="true"
+ layout="topleft"
+ left_pad="1"
+ name="folder_view_btn"
+ top="1"
+ width="31" />
+ <button
+ follows="bottom|left"
+ height="25"
+ image_hover_unselected="Toolbar_Middle_Over"
+ image_overlay="List_View_On"
+ image_selected="Toolbar_Middle_Selected"
+ image_unselected="Toolbar_Middle_Off"
+ is_toggle="true"
+ layout="topleft"
+ left_pad="1"
+ name="list_view_btn"
+ top="1"
+ width="31" />
+ <icon
+ follows="bottom|left|right"
+ height="25"
+ image_name="Toolbar_Middle_Off"
+ layout="topleft"
+ left_pad="1"
+ name="dummy_right_icon"
+ width="186" >
+ </icon>
+ <button
+ follows="bottom|right"
+ height="25"
+ image_hover_unselected="Toolbar_Right_Over"
+ image_overlay="Shop"
+ image_selected="Toolbar_Right_Selected"
+ image_unselected="Toolbar_Right_Off"
+ layout="topleft"
+ left_pad="1"
+ name="shop_btn_2"
+ top="1"
+ tool_tip="Visit the SL Marketplace. You can also select something you are wearing, then click here to see more things like it"
+ width="31" />
+ </panel>
- <!-- SAVE AND REVERT BUTTONS -->
- <panel
- follows="left|right|bottom"
- height="30"
- layout="topleft"
- left="4"
- top_pad="2"
- name="save_revert_button_bar"
- width="300">
- <layout_stack
- follows="bottom|left|right"
- height="23"
- layout="topleft"
- mouse_opaque="false"
- name="button_bar_ls"
- left="0"
- orientation="horizontal"
- top="0"
- width="313">
- <layout_panel
- follows="bottom|left|right"
- height="23"
- layout="bottomleft"
- left="0"
- mouse_opaque="false"
- name="save_btn_lp"
- auto_resize="true"
- width="156">
- <button
- follows="bottom|left|right"
- height="23"
- label="Save"
- left="1"
- layout="topleft"
- name="save_btn"
- top="0"
- width="155" />
- <button
- follows="bottom|right"
- height="23"
- name="save_flyout_btn"
- label=""
- layout="topleft"
- left_pad="-20"
- tab_stop="false"
- top="0"
- image_selected="SegmentedBtn_Right_Selected_Press"
- image_unselected="SegmentedBtn_Right_Off"
- image_pressed="SegmentedBtn_Right_Press"
- image_pressed_selected="SegmentedBtn_Right_Selected_Press"
- image_overlay="Arrow_Small_Up"
- width="20"/>
- </layout_panel>
- <layout_panel
- follows="bottom|left|right"
- height="23"
- layout="bottomleft"
- left_pad="3"
- mouse_opaque="false"
- name="revert_btn_lp"
- auto_resize="true"
- width="147">
- <button
- follows="bottom|left|right"
- height="23"
- left="0"
- label="Undo Changes"
- layout="topleft"
- name="revert_btn"
- top="0"
- tool_tip="Revert to last saved version"
- width="147" />
- </layout_panel>
- </layout_stack>
- </panel>
+ <!-- SAVE AND REVERT BUTTONS -->
+ <panel
+ follows="left|right|bottom"
+ height="30"
+ layout="topleft"
+ left="4"
+ top_pad="2"
+ name="save_revert_button_bar"
+ width="300">
+ <layout_stack
+ follows="bottom|left|right"
+ height="23"
+ layout="topleft"
+ mouse_opaque="false"
+ name="button_bar_ls"
+ left="0"
+ orientation="horizontal"
+ top="0"
+ width="313">
+ <layout_panel
+ follows="bottom|left|right"
+ height="23"
+ layout="bottomleft"
+ left="0"
+ mouse_opaque="false"
+ name="save_btn_lp"
+ auto_resize="true"
+ width="156">
+ <button
+ follows="bottom|left|right"
+ height="23"
+ label="Save"
+ left="1"
+ layout="topleft"
+ name="save_btn"
+ top="0"
+ width="155" />
+ <button
+ follows="bottom|right"
+ height="23"
+ name="save_flyout_btn"
+ label=""
+ layout="topleft"
+ left_pad="-20"
+ tab_stop="false"
+ top="0"
+ image_selected="SegmentedBtn_Right_Selected_Press"
+ image_unselected="SegmentedBtn_Right_Off"
+ image_pressed="SegmentedBtn_Right_Press"
+ image_pressed_selected="SegmentedBtn_Right_Selected_Press"
+ image_overlay="Arrow_Small_Up"
+ width="20"/>
+ </layout_panel>
+ <layout_panel
+ follows="bottom|left|right"
+ height="23"
+ layout="bottomleft"
+ left_pad="3"
+ mouse_opaque="false"
+ name="revert_btn_lp"
+ auto_resize="true"
+ width="147">
+ <button
+ follows="bottom|left|right"
+ height="23"
+ left="0"
+ label="Undo Changes"
+ layout="topleft"
+ name="revert_btn"
+ top="0"
+ tool_tip="Revert to last saved version"
+ width="147" />
+ </layout_panel>
+ </layout_stack>
+ </panel>
</panel>