diff options
Diffstat (limited to 'indra/newview/llfloaterfixedenvironment.h')
-rw-r--r-- | indra/newview/llfloaterfixedenvironment.h | 117 |
1 files changed, 46 insertions, 71 deletions
diff --git a/indra/newview/llfloaterfixedenvironment.h b/indra/newview/llfloaterfixedenvironment.h index 0d2d21533e..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,18 +44,19 @@ class LLFloaterFixedEnvironment : public LLFloater public: LLFloaterFixedEnvironment(const LLSD &key); + ~LLFloaterFixedEnvironment(); virtual BOOL postBuild() override; virtual void onFocusReceived() override; virtual void onFocusLost() override; - void setEditSettings(LLSettingsBase::ptr_t &settings) { mSettings = settings; syncronizeTabs(); } + void setEditSettings(const LLSettingsBase::ptr_t &settings) { mSettings = settings; syncronizeTabs(); refresh(); } LLSettingsBase::ptr_t getEditSettings() const { return mSettings; } protected: virtual void updateEditEnvironment() = 0; - virtual void refresh(); + virtual void refresh() override; virtual void syncronizeTabs(); @@ -63,93 +65,66 @@ protected: LLSettingsBase::ptr_t mSettings; + virtual void doLoadFromInventory() = 0; + virtual void doImportFromDisk() = 0; + virtual void doApplyCreateNewInventory(); + virtual void doApplyUpdateInventory(); + virtual void doApplyEnvironment(const std::string &where); -private: - void onNameChanged(const std::string &name); - -#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); + bool canUseInventory() const; + bool canApplyRegion() const; + bool canApplyParcel() const; - // 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); + LLFlyoutComboBtn * mFlyoutControl; - 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(); +private: + void onNameChanged(const std::string &name); - // for handling when the star slider is moved to adjust the alpha - void onStarAlphaMoved(LLUICtrl* ctrl); + void onButtonLoad(); + void onButtonImport(); + void onButtonApply(LLUICtrl *ctrl, const LLSD &data); + void onButtonCancel(); - // handle cloud scrolling - void onCloudScrollXMoved(LLUICtrl* ctrl); - void onCloudScrollYMoved(LLUICtrl* ctrl); +}; - //-- WL stuff ends -------------------------------------------------------- +class LLFloaterFixedEnvironmentWater : public LLFloaterFixedEnvironment +{ + LOG_CLASS(LLFloaterFixedEnvironmentWater); - void reset(); /// reset the floater to its initial state - bool isNewPreset() const; - void refreshSkyPresetsList(); - void enableEditing(bool enable); - void saveRegionSky(); - std::string getSelectedPresetName() const; +public: + LLFloaterFixedEnvironmentWater(const LLSD &key); - void onSkyPresetNameEdited(); - void onSkyPresetSelected(); - bool onSaveAnswer(const LLSD& notification, const LLSD& response); - void onSaveConfirmed(); + BOOL postBuild() override; - void onBtnSave(); - void onBtnCancel(); + virtual void onOpen(const LLSD& key) override; + virtual void onClose(bool app_quitting) override; - void onSkyPresetListChange(); - void onRegionSettingsChange(); - void onRegionInfoUpdate(); +protected: + virtual void updateEditEnvironment() override; - LLSettingsSky::ptr_t mEditSettings; + virtual void doLoadFromInventory() override; + virtual void doImportFromDisk() override; - LLLineEditor* mSkyPresetNameEditor; - LLComboBox* mSkyPresetCombo; - LLCheckBoxCtrl* mMakeDefaultCheckBox; - LLButton* mSaveButton; - LLSkySettingsAdapterPtr mSkyAdapter; -#endif +private: }; -class LLFloaterFixedEnvironmentWater : public LLFloaterFixedEnvironment +class LLFloaterFixedEnvironmentSky : public LLFloaterFixedEnvironment { - LOG_CLASS(LLFloaterFixedEnvironmentWater); + LOG_CLASS(LLFloaterFixedEnvironmentSky); public: - LLFloaterFixedEnvironmentWater(const LLSD &key); + LLFloaterFixedEnvironmentSky(const LLSD &key); - BOOL postBuild() override; + BOOL postBuild() override; + + virtual void onOpen(const LLSD& key) override; + virtual void onClose(bool app_quitting) override; + +protected: + virtual void updateEditEnvironment() override; -protected: - virtual void updateEditEnvironment() override; + virtual void doLoadFromInventory() override; + virtual void doImportFromDisk() override; private: }; @@ -159,7 +134,7 @@ class LLSettingsEditPanel : public LLPanel public: virtual void setSettings(LLSettingsBase::ptr_t &) = 0; - virtual void refresh() = 0; +// virtual void refresh() override; protected: LLSettingsEditPanel() : |