Make environment quick selection comboboxes show the correct current setting and replace the non-functional and buggy sun position & time offset with a button to open the new personal lighting floater
parent
009564950f
commit
d90366171c
|
|
@ -2444,7 +2444,6 @@ LLEnvironment::DayInstance::DayInstance(EnvSelection_t env) :
|
|||
mWater(),
|
||||
mDayLength(LLSettingsDay::DEFAULT_DAYLENGTH),
|
||||
mDayOffset(LLSettingsDay::DEFAULT_DAYOFFSET),
|
||||
mDayOffsetOverride(LLSettingsDay::MINIMUM_DAYOFFSET), // KC
|
||||
mBlenderSky(),
|
||||
mBlenderWater(),
|
||||
mInitialized(false),
|
||||
|
|
@ -2554,7 +2553,6 @@ void LLEnvironment::DayInstance::clear()
|
|||
mWater.reset();
|
||||
mDayLength = LLSettingsDay::DEFAULT_DAYLENGTH;
|
||||
mDayOffset = LLSettingsDay::DEFAULT_DAYOFFSET;
|
||||
mDayOffsetOverride = LLSettingsDay::MINIMUM_DAYOFFSET; // KC
|
||||
mBlenderSky.reset();
|
||||
mBlenderWater.reset();
|
||||
mSkyTrack = 1;
|
||||
|
|
@ -2578,8 +2576,7 @@ void LLEnvironment::DayInstance::setBlenders(const LLSettingsBlender::ptr_t &sky
|
|||
LLSettingsBase::TrackPosition LLEnvironment::DayInstance::getProgress() const
|
||||
{
|
||||
LLSettingsBase::Seconds now(LLDate::now().secondsSinceEpoch());
|
||||
// now += mDayOffset;
|
||||
now += mDayOffset + mDayOffsetOverride; // KC
|
||||
now += mDayOffset;
|
||||
|
||||
if ((mDayLength <= 0) || !mDayCycle)
|
||||
return -1.0f; // no actual day cycle.
|
||||
|
|
@ -2596,8 +2593,7 @@ void LLEnvironment::DayInstance::animate()
|
|||
{
|
||||
LLSettingsBase::Seconds now(LLDate::now().secondsSinceEpoch());
|
||||
|
||||
// now += mDayOffset;
|
||||
now += mDayOffset + mDayOffsetOverride; // KC
|
||||
now += mDayOffset;
|
||||
|
||||
if (!mDayCycle)
|
||||
return;
|
||||
|
|
@ -2615,8 +2611,7 @@ void LLEnvironment::DayInstance::animate()
|
|||
{
|
||||
mWater = LLSettingsVOWater::buildDefaultWater();
|
||||
mBlenderWater = std::make_shared<LLTrackBlenderLoopingTime>(mWater, mDayCycle, 0,
|
||||
// mDayLength, mDayOffset, DEFAULT_UPDATE_THRESHOLD);
|
||||
mDayLength, mDayOffset + mDayOffsetOverride, DEFAULT_UPDATE_THRESHOLD); // KC
|
||||
mDayLength, mDayOffset, DEFAULT_UPDATE_THRESHOLD);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2634,8 +2629,7 @@ void LLEnvironment::DayInstance::animate()
|
|||
{
|
||||
mSky = LLSettingsVOSky::buildDefaultSky();
|
||||
mBlenderSky = std::make_shared<LLTrackBlenderLoopingTime>(mSky, mDayCycle, 1,
|
||||
// mDayLength, mDayOffset, DEFAULT_UPDATE_THRESHOLD);
|
||||
mDayLength, mDayOffset + mDayOffsetOverride, DEFAULT_UPDATE_THRESHOLD); // KC
|
||||
mDayLength, mDayOffset, DEFAULT_UPDATE_THRESHOLD);
|
||||
mBlenderSky->switchTrack(mSkyTrack, 0.0);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -262,11 +262,9 @@ public:
|
|||
LLSettingsWater::ptr_t getWater() const { return mWater; }
|
||||
LLSettingsDay::Seconds getDayLength() const { return mDayLength; }
|
||||
LLSettingsDay::Seconds getDayOffset() const { return mDayOffset; }
|
||||
LLSettingsDay::Seconds getDayOffsetOverride() const { return mDayOffsetOverride; } //KC
|
||||
S32 getSkyTrack() const { return mSkyTrack; }
|
||||
|
||||
void setDayOffset(LLSettingsBase::Seconds offset) { mDayOffset = offset; animate(); }
|
||||
void setDayOffsetOverride(LLSettingsBase::Seconds offset) { mDayOffsetOverride = offset; animate(); } //KC
|
||||
|
||||
virtual void animate();
|
||||
|
||||
|
|
@ -293,7 +291,6 @@ public:
|
|||
|
||||
LLSettingsDay::Seconds mDayLength;
|
||||
LLSettingsDay::Seconds mDayOffset;
|
||||
LLSettingsDay::Seconds mDayOffsetOverride;
|
||||
S32 mLastTrackAltitude;
|
||||
|
||||
LLSettingsBlender::ptr_t mBlenderSky;
|
||||
|
|
@ -325,14 +322,6 @@ public:
|
|||
DayInstance::ptr_t getSelectedEnvironmentInstance();
|
||||
DayInstance::ptr_t getSharedEnvironmentInstance();
|
||||
|
||||
//<KC: Environment hacks>
|
||||
public:
|
||||
LLSettingsDay::Seconds getDayLength() const { return (mCurrentEnvironment) ? mCurrentEnvironment->getDayLength() : LLSettingsDay::MINIMUM_DAYOFFSET; }
|
||||
LLSettingsDay::Seconds getDayOffset() const { return (mCurrentEnvironment) ? mCurrentEnvironment->getDayOffset() : LLSettingsDay::INVALID_DAYOFFSET; }
|
||||
void setDayOffsetOverride(LLSettingsBase::Seconds offset) { if (mCurrentEnvironment) mCurrentEnvironment->setDayOffsetOverride(offset); }
|
||||
LLSettingsDay::Seconds getDayOffsetOverride() const { return (mCurrentEnvironment) ? mCurrentEnvironment->getDayOffsetOverride() : LLSettingsDay::MINIMUM_DAYOFFSET; }
|
||||
//</KC: Environment hacks>
|
||||
|
||||
protected:
|
||||
virtual void initSingleton() override;
|
||||
virtual void cleanupSingleton() override;
|
||||
|
|
|
|||
|
|
@ -61,6 +61,8 @@
|
|||
#include "rlvhandler.h"
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
const S32 FLOATER_QUICKPREFS_UPDATE(-5);
|
||||
const S32 FLOATER_PHOTOTOOLS_UPDATE(-6);
|
||||
|
||||
std::string unescape_name(const std::string& name);
|
||||
class FSSettingsCollector : public LLInventoryCollectFunctor
|
||||
|
|
@ -109,6 +111,7 @@ FloaterQuickPrefs::FloaterQuickPrefs(const LLSD& key)
|
|||
: LLTransientDockableFloater(NULL, false, key),
|
||||
mAvatarZOffsetSlider(NULL),
|
||||
mRlvBehaviorCallbackConnection(),
|
||||
mEnvChangedConnection(),
|
||||
mRegionChangedSlot()
|
||||
{
|
||||
// For Phototools
|
||||
|
|
@ -132,6 +135,11 @@ FloaterQuickPrefs::~FloaterQuickPrefs()
|
|||
mRegionChangedSlot.disconnect();
|
||||
}
|
||||
|
||||
if (mEnvChangedConnection.connected())
|
||||
{
|
||||
mEnvChangedConnection.disconnect();
|
||||
}
|
||||
|
||||
if (!getIsPhototools() && !FSCommon::isLegacySkin())
|
||||
{
|
||||
LLTransientFloaterMgr::getInstance()->removeControlView(this);
|
||||
|
|
@ -195,8 +203,6 @@ void FloaterQuickPrefs::initCallbacks()
|
|||
getChild<LLUICtrl>("DCPrevPreset")->setCommitCallback(boost::bind(&FloaterQuickPrefs::onClickDayCyclePrev, this));
|
||||
getChild<LLUICtrl>("DCNextPreset")->setCommitCallback(boost::bind(&FloaterQuickPrefs::onClickDayCycleNext, this));
|
||||
getChild<LLUICtrl>("ResetToRegionDefault")->setCommitCallback(boost::bind(&FloaterQuickPrefs::onClickResetToRegionDefault, this));
|
||||
getChild<LLMultiSliderCtrl>("time_offset")->setSliderMouseUpCallback(boost::bind(&FloaterQuickPrefs::onDayOffset, this));
|
||||
getChild<LLUICtrl>("sun_rotation")->setCommitCallback([this](LLUICtrl *, const LLSD &) { onSunMoved(); });
|
||||
|
||||
// Phototools additions
|
||||
if (getIsPhototools())
|
||||
|
|
@ -269,7 +275,7 @@ void FloaterQuickPrefs::initCallbacks()
|
|||
mRlvBehaviorCallbackConnection = gRlvHandler.setBehaviourCallback(boost::bind(&FloaterQuickPrefs::updateRlvRestrictions, this, _1, _2));
|
||||
gSavedSettings.getControl("IndirectMaxNonImpostors")->getCommitSignal()->connect(boost::bind(&FloaterQuickPrefs::updateMaxNonImpostors, this, _2));
|
||||
|
||||
LLEnvironment::instance().setEnvironmentChanged([this](LLEnvironment::EnvSelection_t, S32){ setSelectedEnvironment(); });
|
||||
mEnvChangedConnection = LLEnvironment::instance().setEnvironmentChanged([this](LLEnvironment::EnvSelection_t env, S32 version){ setSelectedEnvironment(); });
|
||||
}
|
||||
|
||||
void FloaterQuickPrefs::loadDayCyclePresets(const std::multimap<std::string, LLUUID>& daycycle_map)
|
||||
|
|
@ -292,7 +298,6 @@ void FloaterQuickPrefs::loadDayCyclePresets(const std::multimap<std::string, LLU
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void FloaterQuickPrefs::loadSkyPresets(const std::multimap<std::string, LLUUID>& sky_map)
|
||||
{
|
||||
mWLPresetsCombo->operateOnAll(LLComboBox::OP_DELETE);
|
||||
|
|
@ -383,136 +388,47 @@ void FloaterQuickPrefs::loadPresets()
|
|||
|
||||
void FloaterQuickPrefs::setSelectedEnvironment()
|
||||
{
|
||||
LL_INFOS() << "EEP: setSelectedEnvironment: " << LLEnvironment::instance().getSelectedEnvironment() << LL_ENDL;
|
||||
//LL_INFOS() << "EEP: getSelectedEnvironment: " << LLEnvironment::instance().getSelectedEnvironment() << LL_ENDL;
|
||||
|
||||
switch (LLEnvironment::instance().getSelectedEnvironment())
|
||||
mWLPresetsCombo->selectByValue(LLSD(PRESET_NAME_REGION_DEFAULT));
|
||||
mWaterPresetsCombo->selectByValue(LLSD(PRESET_NAME_REGION_DEFAULT));
|
||||
mDayCyclePresetsCombo->selectByValue(LLSD(PRESET_NAME_REGION_DEFAULT));
|
||||
|
||||
if (LLEnvironment::instance().getSelectedEnvironment() == LLEnvironment::ENV_LOCAL)
|
||||
{
|
||||
case LLEnvironment::ENV_REGION:
|
||||
case LLEnvironment::ENV_PARCEL:
|
||||
// Day cycle, fixed sky and fixed water may all be set at the same time
|
||||
// Check and set day cycle first. Fixed sky and water both override
|
||||
// the sky and water settings in a day cycle, so check them after the
|
||||
// day cycle. If no fixed sky or fixed water is set, they are either
|
||||
// defined in the day cycle or inherited from a higher environment level.
|
||||
LLSettingsDay::ptr_t day = LLEnvironment::instance().getEnvironmentDay(LLEnvironment::ENV_LOCAL);
|
||||
if (day && day->getAssetId().notNull())
|
||||
{
|
||||
LL_INFOS() << "EEP: ENV_REGION / ENV_PARCEL" << LL_ENDL;
|
||||
//LL_INFOS() << "EEP: day name = " << day->getName() << " - asset id = " << day->getAssetId() << LL_ENDL;
|
||||
|
||||
mWLPresetsCombo->selectByValue(LLSD(PRESET_NAME_REGION_DEFAULT));
|
||||
mWaterPresetsCombo->selectByValue(LLSD(PRESET_NAME_REGION_DEFAULT));
|
||||
mDayCyclePresetsCombo->selectByValue(LLSD(PRESET_NAME_REGION_DEFAULT));
|
||||
break;
|
||||
mDayCyclePresetsCombo->selectByValue(LLSD(day->getAssetId()));
|
||||
|
||||
// Water is part of a day cycle
|
||||
mWLPresetsCombo->selectByValue(LLSD(PRESET_NAME_DAY_CYCLE));
|
||||
mWaterPresetsCombo->selectByValue(LLSD(PRESET_NAME_DAY_CYCLE));
|
||||
}
|
||||
|
||||
case LLEnvironment::ENV_LOCAL:
|
||||
LLSettingsSky::ptr_t sky = LLEnvironment::instance().getEnvironmentFixedSky(LLEnvironment::ENV_LOCAL);
|
||||
if (sky && sky->getAssetId().notNull())
|
||||
{
|
||||
//LLSettingsDay::ptr_t day = LLEnvironment::instance().getCurrentDay();
|
||||
LLSettingsDay::ptr_t day = LLEnvironment::instance().getEnvironmentDay(LLEnvironment::ENV_LOCAL);
|
||||
if (day)
|
||||
{
|
||||
LL_INFOS() << "EEP: day name = " << day->getName() << LL_ENDL;
|
||||
//LL_INFOS() << "EEP: sky name = " << sky->getName() << " - asset id = " << sky->getAssetId() << LL_ENDL;
|
||||
|
||||
LLUUID asset_id = day->getAssetId();
|
||||
if (asset_id.notNull())
|
||||
{
|
||||
mDayCyclePresetsCombo->selectByValue(LLSD(asset_id));
|
||||
|
||||
// Water is part of a day cycle
|
||||
mWLPresetsCombo->selectByValue(LLSD(PRESET_NAME_DAY_CYCLE));
|
||||
mWaterPresetsCombo->selectByValue(LLSD(PRESET_NAME_DAY_CYCLE));
|
||||
}
|
||||
else
|
||||
{
|
||||
//mDayCyclePresetsCombo->selectByValue(LLSD(day->getName()));
|
||||
std::string preset_name = day->getName();
|
||||
if (preset_name == "_default_")
|
||||
{
|
||||
preset_name = "Default";
|
||||
}
|
||||
mDayCyclePresetsCombo->selectByValue(preset_name);
|
||||
|
||||
mWLPresetsCombo->selectByValue(LLSD(PRESET_NAME_DAY_CYCLE));
|
||||
|
||||
// Legacy daycycle has no water. Need to find out what is currently selected
|
||||
// as water preset. Seems it will always be default fixed water ("_default_").
|
||||
LLSettingsWater::ptr_t water = LLEnvironment::instance().getEnvironmentFixedWater(LLEnvironment::ENV_LOCAL);
|
||||
if (water)
|
||||
{
|
||||
LL_INFOS() << "EEP: water name = " << water->getName() << LL_ENDL;
|
||||
|
||||
LLUUID asset_id = water->getAssetId();
|
||||
if (asset_id.notNull())
|
||||
{
|
||||
mWaterPresetsCombo->selectByValue(LLSD(asset_id));
|
||||
}
|
||||
else
|
||||
{
|
||||
//mWaterPresetsCombo->selectByValue(LLSD(water->getName()));
|
||||
std::string preset_name = water->getName();
|
||||
if (preset_name == "_default_")
|
||||
{
|
||||
preset_name = "Default";
|
||||
}
|
||||
mWaterPresetsCombo->selectByValue(preset_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mDayCyclePresetsCombo->selectByValue(LLSD(PRESET_NAME_NONE));
|
||||
|
||||
//LLSettingsSky::ptr_t sky = LLEnvironment::instance().getCurrentSky();
|
||||
LLSettingsSky::ptr_t sky = LLEnvironment::instance().getEnvironmentFixedSky(LLEnvironment::ENV_LOCAL);
|
||||
if (sky)
|
||||
{
|
||||
LL_INFOS() << "EEP: sky name = " << sky->getName() << LL_ENDL;
|
||||
|
||||
LLUUID asset_id = sky->getAssetId();
|
||||
if (asset_id.notNull())
|
||||
{
|
||||
mWLPresetsCombo->selectByValue(LLSD(asset_id));
|
||||
}
|
||||
else
|
||||
{
|
||||
//mWLPresetsCombo->selectByValue(LLSD(sky->getName()));
|
||||
std::string preset_name = sky->getName();
|
||||
if (preset_name == "_default_")
|
||||
{
|
||||
preset_name = "Default";
|
||||
}
|
||||
mWLPresetsCombo->selectByValue(preset_name);
|
||||
}
|
||||
}
|
||||
|
||||
// LLEnvironment::instance().getCurrentWater() will return correct preset only after
|
||||
// calling updateEnvironment(), which is too late.
|
||||
//LLSettingsWater::ptr_t water = LLEnvironment::instance().getCurrentWater();
|
||||
LLSettingsWater::ptr_t water = LLEnvironment::instance().getEnvironmentFixedWater(LLEnvironment::ENV_LOCAL);
|
||||
if (water)
|
||||
{
|
||||
LL_INFOS() << "EEP: water name = " << water->getName() << LL_ENDL;
|
||||
|
||||
LLUUID asset_id = water->getAssetId();
|
||||
if (asset_id.notNull())
|
||||
{
|
||||
mWaterPresetsCombo->selectByValue(LLSD(asset_id));
|
||||
}
|
||||
else
|
||||
{
|
||||
// What if preset name is empty???
|
||||
//mWaterPresetsCombo->selectByValue(LLSD(water->getName()));
|
||||
std::string preset_name = water->getName();
|
||||
if (preset_name == "_default_")
|
||||
{
|
||||
preset_name = "Default";
|
||||
}
|
||||
mWaterPresetsCombo->selectByValue(preset_name);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
mWLPresetsCombo->selectByValue(LLSD(sky->getAssetId()));
|
||||
}
|
||||
|
||||
LLSettingsWater::ptr_t water = LLEnvironment::instance().getEnvironmentFixedWater(LLEnvironment::ENV_LOCAL);
|
||||
if (water && water->getAssetId().notNull())
|
||||
{
|
||||
//LL_INFOS() << "EEP: water name = " << water->getName() << " - asset id = " << water->getAssetId() << LL_ENDL;
|
||||
|
||||
mWaterPresetsCombo->selectByValue(LLSD(water->getAssetId()));
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
updateDayOffset();
|
||||
}
|
||||
|
||||
BOOL FloaterQuickPrefs::postBuild()
|
||||
|
|
@ -564,9 +480,6 @@ BOOL FloaterQuickPrefs::postBuild()
|
|||
mWaterPresetsCombo = getChild<LLComboBox>("WaterPresetsCombo");
|
||||
mWLPresetsCombo = getChild<LLComboBox>("WLPresetsCombo");
|
||||
mDayCyclePresetsCombo = getChild<LLComboBox>("DCPresetsCombo");
|
||||
mWLSunRot = getChild<LLVirtualTrackball>("sun_rotation");
|
||||
mWLDayOffset = getChild<LLMultiSliderCtrl>("time_offset");
|
||||
mWLDayOffset->addSlider(0);
|
||||
|
||||
initCallbacks();
|
||||
loadPresets();
|
||||
|
|
@ -872,70 +785,11 @@ void FloaterQuickPrefs::onClickDayCycleNext()
|
|||
selectDayCyclePreset(mDayCyclePresetsCombo->getSelectedValue());
|
||||
}
|
||||
|
||||
void FloaterQuickPrefs::draw()
|
||||
{
|
||||
updateSun();
|
||||
LLTransientDockableFloater::draw();
|
||||
}
|
||||
|
||||
void FloaterQuickPrefs::updateDayOffset()
|
||||
{
|
||||
// KC: Limit day cycle offset max to day length if less than a full real day
|
||||
LLSettingsDay::Seconds day_length = LLEnvironment::instance().getDayLength();
|
||||
if (day_length > LLSettingsDay::MINIMUM_DAYOFFSET)
|
||||
{
|
||||
if (day_length < LLSettingsDay::MAXIMUM_DAYOFFSET)
|
||||
{
|
||||
mWLDayOffset->setMaxValue(day_length);
|
||||
}
|
||||
else
|
||||
{
|
||||
mWLDayOffset->setMaxValue(LLSettingsDay::MAXIMUM_DAYOFFSET);
|
||||
}
|
||||
mWLDayOffset->setCurSliderValue(LLEnvironment::instance().getDayOffsetOverride());
|
||||
}
|
||||
else
|
||||
{
|
||||
mWLDayOffset->setCurSliderValue(0);
|
||||
}
|
||||
}
|
||||
|
||||
const F32 SUN_ROTATION_PRECISION = 0.1f;
|
||||
|
||||
void FloaterQuickPrefs::updateSun()
|
||||
{
|
||||
LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky();
|
||||
mWLSunRot->setRotation(psky->getSunRotation());
|
||||
}
|
||||
|
||||
void FloaterQuickPrefs::onDayOffset()
|
||||
{
|
||||
//KC: Forces the environment time by an additional offset
|
||||
if (LLEnvironment::instance().getDayOffset() > LLSettingsDay::INVALID_DAYOFFSET)
|
||||
{
|
||||
LLSettingsDay::Seconds day_offset(mWLDayOffset->getCurSliderValue());
|
||||
LLEnvironment::instance().setDayOffsetOverride(day_offset);
|
||||
LLEnvironment::instance().updateEnvironment();
|
||||
}
|
||||
}
|
||||
|
||||
void FloaterQuickPrefs::onSunMoved()
|
||||
{
|
||||
LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky();
|
||||
psky->setSunRotation(mWLSunRot->getRotation());
|
||||
psky->updateSettings();
|
||||
}
|
||||
|
||||
void FloaterQuickPrefs::onClickResetToRegionDefault()
|
||||
{
|
||||
mWLPresetsCombo->setValue(LLSD(PRESET_NAME_REGION_DEFAULT));
|
||||
mWaterPresetsCombo->setValue(LLSD(PRESET_NAME_REGION_DEFAULT));
|
||||
|
||||
LLEnvironment::instance().setDayOffsetOverride(LLSettingsDay::MINIMUM_DAYOFFSET);
|
||||
mWLDayOffset->setCurSliderValue(0);
|
||||
LLEnvironment::instance().clearEnvironment(LLEnvironment::ENV_LOCAL);
|
||||
LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL);
|
||||
LLEnvironment::instance().updateEnvironment();
|
||||
LLEnvironment::instance().setSharedEnvironment();
|
||||
}
|
||||
|
||||
void FloaterQuickPrefs::setSelectedSky(const std::string& preset_name)
|
||||
|
|
@ -1141,10 +995,7 @@ void FloaterQuickPrefs::enableWindlightButtons(BOOL enable)
|
|||
childSetEnabled("DCPresetsCombo", enable);
|
||||
childSetEnabled("DCPrevPreset", enable);
|
||||
childSetEnabled("DCNextPreset", enable);
|
||||
//<FS:TS> FIRE-13448: Quickprefs daycycle slider allows evading @setenv=n
|
||||
childSetEnabled("time_offset", enable);
|
||||
childSetEnabled("sun_rotation", enable);
|
||||
//</FS:TS> FIRE-13448
|
||||
childSetEnabled("btn_personal_lighting", enable);
|
||||
|
||||
if (getIsPhototools())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@
|
|||
#ifndef QUICKPREFS_H
|
||||
#define QUICKPREFS_H
|
||||
|
||||
#include "llenvironment.h"
|
||||
#include "lltransientdockablefloater.h"
|
||||
//#include "llwlparamset.h" // [EEPMERGE]
|
||||
#include "rlvdefines.h"
|
||||
|
||||
const std::string PHOTOTOOLS_FLOATER = "phototools";
|
||||
|
|
@ -67,9 +67,6 @@ private:
|
|||
FloaterQuickPrefs(const LLSD& key);
|
||||
~FloaterQuickPrefs();
|
||||
|
||||
void onDayOffset();
|
||||
void onSunMoved();
|
||||
|
||||
void selectSkyPreset(const LLSD& preset);
|
||||
void selectWaterPreset(const LLSD& preset);
|
||||
void selectDayCyclePreset(const LLSD& preset);
|
||||
|
|
@ -98,12 +95,8 @@ private:
|
|||
void updateRlvRestrictions(ERlvBehaviour behavior, ERlvParamType type);
|
||||
void enableWindlightButtons(BOOL enable);
|
||||
|
||||
void updateSun();
|
||||
void updateDayOffset();
|
||||
|
||||
public:
|
||||
/*virtual*/ BOOL postBuild();
|
||||
/*virtual*/ void draw();
|
||||
virtual void onOpen(const LLSD& key);
|
||||
|
||||
void setSelectedSky(const std::string& preset_name);
|
||||
|
|
@ -119,9 +112,7 @@ public:
|
|||
|
||||
private:
|
||||
|
||||
// Windlight controls
|
||||
LLMultiSliderCtrl* mWLDayOffset;
|
||||
LLVirtualTrackball* mWLSunRot;
|
||||
// Windlight controls
|
||||
LLComboBox* mWLPresetsCombo;
|
||||
LLComboBox* mWaterPresetsCombo;
|
||||
LLComboBox* mDayCyclePresetsCombo;
|
||||
|
|
@ -161,6 +152,11 @@ private:
|
|||
LLSliderCtrl* mMaxComplexitySlider;
|
||||
LLTextBox* mMaxComplexityLabel;
|
||||
|
||||
LLSettingsSky::ptr_t mLiveSky;
|
||||
LLSettingsWater::ptr_t mLiveWater;
|
||||
LLSettingsDay::ptr_t mLiveDay;
|
||||
LLEnvironment::connection_t mEnvChangedConnection;
|
||||
|
||||
// Vignette UI callbacks
|
||||
void onChangeVignetteX();
|
||||
void onChangeVignetteY();
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@
|
|||
top_pad="5"
|
||||
left="4"
|
||||
width="275"
|
||||
height="85"
|
||||
height="115"
|
||||
border_visible="true"
|
||||
background_visible="true">
|
||||
<text
|
||||
|
|
@ -227,44 +227,29 @@
|
|||
left_pad="0"
|
||||
image_overlay="Arrow_Right_Off"
|
||||
scale_image="true"/>
|
||||
</panel>
|
||||
|
||||
<panel
|
||||
name="P_Sun"
|
||||
follows="top|left"
|
||||
layout="topleft"
|
||||
top_pad="5"
|
||||
left="4"
|
||||
width="275"
|
||||
height="200"
|
||||
border_visible="true"
|
||||
background_visible="true">
|
||||
<text
|
||||
top="10"
|
||||
left="6"
|
||||
height="10"
|
||||
width="90"
|
||||
<button
|
||||
enabled="true"
|
||||
name="btn_personal_lighting"
|
||||
follows="left|top"
|
||||
layout="topleft"
|
||||
>
|
||||
Sun Position:
|
||||
</text>
|
||||
<sun_moon_trackball
|
||||
name="sun_rotation"
|
||||
height="20"
|
||||
width="245"
|
||||
top_pad="5"
|
||||
left_delta="0"
|
||||
height="150"
|
||||
width="150"
|
||||
follows="left|top"
|
||||
thumb_mode="sun"
|
||||
/>
|
||||
left="5"
|
||||
label="Personal Lighting...">
|
||||
<button.commit_callback
|
||||
function="Floater.ToggleOrBringToFront"
|
||||
parameter="env_adjust_snapshot" />
|
||||
<button.on_enable
|
||||
function="RLV.EnableIfNot"
|
||||
parameter="setenv" />
|
||||
</button>
|
||||
<button
|
||||
name="ResetToRegionDefault"
|
||||
label=""
|
||||
tool_tip="Reset the WindLight options to region default"
|
||||
tool_tip="Reset the environment options to shared environment."
|
||||
enabled="true"
|
||||
top="10"
|
||||
left="236"
|
||||
top_delta="0"
|
||||
left_pad="0"
|
||||
height="20"
|
||||
width="20"
|
||||
follows="left|top"
|
||||
|
|
@ -272,44 +257,16 @@
|
|||
label_selected=""
|
||||
scale_image="true"
|
||||
/>
|
||||
<text
|
||||
top="10"
|
||||
left="170"
|
||||
height="10"
|
||||
width="90"
|
||||
follows="left|top"
|
||||
layout="topleft"
|
||||
>
|
||||
WL Time:
|
||||
</text>
|
||||
<multi_slider
|
||||
name="time_offset"
|
||||
top_delta="15"
|
||||
left_delta="15"
|
||||
height="150"
|
||||
width="15"
|
||||
follows="left|top"
|
||||
layout="topleft"
|
||||
can_edit_text="true"
|
||||
decimal_digits="0"
|
||||
increment="120"
|
||||
initial_value="0"
|
||||
max_sliders="1"
|
||||
max_val="86400"
|
||||
orientation="vertical"
|
||||
show_text="false"
|
||||
/>
|
||||
</panel>
|
||||
|
||||
<!-- KC: These next two panels need to be refactored, hiding for now -->
|
||||
<panel
|
||||
visible="false"
|
||||
visible="true"
|
||||
name="P_Q_Windlights"
|
||||
follows="top|left"
|
||||
layout="topleft"
|
||||
top_delta="65"
|
||||
top_pad="5"
|
||||
left="4"
|
||||
width="135"
|
||||
width="165"
|
||||
height="135"
|
||||
border_visible="true"
|
||||
background_visible="true">
|
||||
|
|
@ -321,7 +278,7 @@
|
|||
top_pad="5"
|
||||
height="20"
|
||||
word_wrap="true"
|
||||
width="135">
|
||||
width="155">
|
||||
Quick Windlights
|
||||
</text>
|
||||
<view_border
|
||||
|
|
@ -332,7 +289,7 @@
|
|||
left="10"
|
||||
name="horiz_separator1"
|
||||
top_pad="-7"
|
||||
width="100"/>
|
||||
width="145"/>
|
||||
<button
|
||||
follows="left|top"
|
||||
name="Sunrise"
|
||||
|
|
@ -341,7 +298,7 @@
|
|||
layout="topleft"
|
||||
left="10"
|
||||
top_pad="5"
|
||||
width="100">
|
||||
width="145">
|
||||
<button.commit_callback
|
||||
function="World.EnvSettings"
|
||||
parameter="sunrise"/>
|
||||
|
|
@ -354,7 +311,7 @@
|
|||
layout="topleft"
|
||||
left="10"
|
||||
top_pad="2"
|
||||
width="100">
|
||||
width="145">
|
||||
<button.commit_callback
|
||||
function="World.EnvSettings"
|
||||
parameter="noon"/>
|
||||
|
|
@ -367,7 +324,7 @@
|
|||
layout="topleft"
|
||||
left="10"
|
||||
top_pad="2"
|
||||
width="100">
|
||||
width="145">
|
||||
<button.commit_callback
|
||||
function="World.EnvSettings"
|
||||
parameter="sunset"/>
|
||||
|
|
@ -380,7 +337,7 @@
|
|||
layout="topleft"
|
||||
left="10"
|
||||
top_pad="2"
|
||||
width="100">
|
||||
width="145">
|
||||
<button.commit_callback
|
||||
function="World.EnvSettings"
|
||||
parameter="midnight"/>
|
||||
|
|
@ -389,11 +346,11 @@
|
|||
follows="left|top"
|
||||
name="Revert to Region Default"
|
||||
height="20"
|
||||
label="Estate Time"
|
||||
label="Shared Environment"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
top_pad="2"
|
||||
width="100">
|
||||
width="145">
|
||||
<button.commit_callback
|
||||
function="World.EnvSettings"
|
||||
parameter="default"/>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
can_resize="false"
|
||||
can_dock="true"
|
||||
can_close="true"
|
||||
height="328"
|
||||
height="178"
|
||||
width="260"
|
||||
layout="topleft"
|
||||
name="quickprefs"
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
left="0"
|
||||
top="16"
|
||||
width="260"
|
||||
height="313"
|
||||
height="152"
|
||||
follows="all"
|
||||
layout="topleft">
|
||||
<layout_stack
|
||||
|
|
@ -59,7 +59,7 @@
|
|||
left="0"
|
||||
top_pad="0"
|
||||
width="260"
|
||||
height="302"
|
||||
height="150"
|
||||
orientation="vertical">
|
||||
|
||||
<layout_panel
|
||||
|
|
@ -67,7 +67,7 @@
|
|||
follows="all"
|
||||
name="wl_options_panel"
|
||||
invisibility_control="QuickPrefsEditMode"
|
||||
height="302">
|
||||
height="150">
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
|
|
@ -309,32 +309,29 @@
|
|||
label_selected=""
|
||||
image_overlay="Arrow_Right_Off"
|
||||
scale_image="true" />
|
||||
<text
|
||||
top_pad="7"
|
||||
left="10"
|
||||
height="10"
|
||||
width="90"
|
||||
follows="left|top"
|
||||
layout="topleft"
|
||||
>
|
||||
Sun Position:
|
||||
</text>
|
||||
<sun_moon_trackball
|
||||
name="sun_rotation"
|
||||
top_pad="5"
|
||||
left_delta="0"
|
||||
height="150"
|
||||
width="150"
|
||||
follows="left|top"
|
||||
thumb_mode="sun"
|
||||
/>
|
||||
<button
|
||||
enabled="true"
|
||||
name="btn_personal_lighting"
|
||||
follows="left|top"
|
||||
height="20"
|
||||
width="208"
|
||||
top_delta="25"
|
||||
left="5"
|
||||
label="Personal Lighting...">
|
||||
<button.commit_callback
|
||||
function="Floater.ToggleOrBringToFront"
|
||||
parameter="env_adjust_snapshot" />
|
||||
<button.on_enable
|
||||
function="RLV.EnableIfNot"
|
||||
parameter="setenv" />
|
||||
</button>
|
||||
<button
|
||||
name="ResetToRegionDefault"
|
||||
label=""
|
||||
tool_tip="Reset the WindLight options to region default"
|
||||
tool_tip="Reset the environment options to shared environment."
|
||||
enabled="true"
|
||||
top_delta="-20"
|
||||
left="236"
|
||||
top_delta="0"
|
||||
left="215"
|
||||
height="20"
|
||||
width="20"
|
||||
follows="left|top"
|
||||
|
|
@ -342,39 +339,12 @@
|
|||
label_selected=""
|
||||
scale_image="true"
|
||||
/>
|
||||
<text
|
||||
top_delta="5"
|
||||
left="170"
|
||||
height="10"
|
||||
width="90"
|
||||
follows="left|top"
|
||||
layout="topleft"
|
||||
>
|
||||
WL Time:
|
||||
</text>
|
||||
<multi_slider
|
||||
name="time_offset"
|
||||
top_delta="15"
|
||||
left_delta="15"
|
||||
height="150"
|
||||
width="15"
|
||||
follows="left|top"
|
||||
layout="topleft"
|
||||
can_edit_text="true"
|
||||
decimal_digits="0"
|
||||
increment="120"
|
||||
initial_value="0"
|
||||
max_sliders="1"
|
||||
max_val="86400"
|
||||
orientation="vertical"
|
||||
show_text="false"
|
||||
/>
|
||||
<!-- <FS:Zi> floater titlebar button to edit dynamic quickprefs -->
|
||||
<button
|
||||
name="button_edit"
|
||||
label=""
|
||||
tool_tip="Click here to configure your Quick Preferences controls"
|
||||
top_delta="130"
|
||||
top_delta="0"
|
||||
left="236"
|
||||
height="20"
|
||||
width="20"
|
||||
|
|
|
|||
|
|
@ -3048,7 +3048,7 @@ Your current position: [AVATAR_POS]
|
|||
<string name="PS_Arms_upward_Legs_apart">Arms upward, Legs apart</string>
|
||||
<string name="PS_Arms_upward_Legs_together">Arms upward, Legs together</string>
|
||||
|
||||
<string name="QP_WL_Region_Default">Region default</string>
|
||||
<string name="QP_WL_Region_Default">Shared Environment</string>
|
||||
<string name="QP_WL_Day_Cycle_Based">Day cycle based</string>
|
||||
<string name="QP_WL_None">None</string>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue