aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llwlparammanager.h
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llwlparammanager.h')
-rw-r--r--linden/indra/newview/llwlparammanager.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/linden/indra/newview/llwlparammanager.h b/linden/indra/newview/llwlparammanager.h
index 72b888d..7094051 100644
--- a/linden/indra/newview/llwlparammanager.h
+++ b/linden/indra/newview/llwlparammanager.h
@@ -45,15 +45,15 @@ class LLGLSLShader;
45struct WLColorControl { 45struct WLColorControl {
46 46
47 F32 r, g, b, i; /// the values 47 F32 r, g, b, i; /// the values
48 char const * name; /// name to use to dereference params 48 std::string mName; /// name to use to dereference params
49 std::string mSliderName; /// name of the slider in menu 49 std::string mSliderName; /// name of the slider in menu
50 bool hasSliderName; /// only set slider name for true color types 50 bool hasSliderName; /// only set slider name for true color types
51 bool isSunOrAmbientColor; /// flag for if it's the sun or ambient color controller 51 bool isSunOrAmbientColor; /// flag for if it's the sun or ambient color controller
52 bool isBlueHorizonOrDensity; /// flag for if it's the Blue Horizon or Density color controller 52 bool isBlueHorizonOrDensity; /// flag for if it's the Blue Horizon or Density color controller
53 53
54 inline WLColorControl(F32 red, F32 green, F32 blue, F32 intensity, char const * n, 54 inline WLColorControl(F32 red, F32 green, F32 blue, F32 intensity,
55 char const * sliderName = "") 55 const std::string& n, const std::string& sliderName = LLStringUtil::null)
56 : r(red), g(green), b(blue), i(intensity), name(n), mSliderName(sliderName) 56 : r(red), g(green), b(blue), i(intensity), mName(n), mSliderName(sliderName)
57 { 57 {
58 // if there's a slider name, say we have one 58 // if there's a slider name, say we have one
59 hasSliderName = false; 59 hasSliderName = false;
@@ -90,18 +90,18 @@ struct WLColorControl {
90 } 90 }
91 91
92 inline void update(LLWLParamSet & params) const { 92 inline void update(LLWLParamSet & params) const {
93 params.set(name, r, g, b, i); 93 params.set(mName, r, g, b, i);
94 } 94 }
95}; 95};
96 96
97// float slider control 97// float slider control
98struct WLFloatControl { 98struct WLFloatControl {
99 F32 x; 99 F32 x;
100 char const * name; 100 std::string mName;
101 F32 mult; 101 F32 mult;
102 102
103 inline WLFloatControl(F32 val, char const * n, F32 m=1.0f) 103 inline WLFloatControl(F32 val, const std::string& n, F32 m=1.0f)
104 : x(val), name(n), mult(m) 104 : x(val), mName(n), mult(m)
105 { 105 {
106 } 106 }
107 107
@@ -116,7 +116,7 @@ struct WLFloatControl {
116 } 116 }
117 117
118 inline void update(LLWLParamSet & params) const { 118 inline void update(LLWLParamSet & params) const {
119 params.set(name, x); 119 params.set(mName, x);
120 } 120 }
121}; 121};
122 122
@@ -129,16 +129,16 @@ public:
129 ~LLWLParamManager(); 129 ~LLWLParamManager();
130 130
131 /// load a preset file 131 /// load a preset file
132 void loadPresets(const LLString & fileName); 132 void loadPresets(const std::string & fileName);
133 133
134 /// save the preset file 134 /// save the preset file
135 void savePresets(const LLString & fileName); 135 void savePresets(const std::string & fileName);
136 136
137 /// load an individual preset into the sky 137 /// load an individual preset into the sky
138 void loadPreset(const LLString & name); 138 void loadPreset(const std::string & name);
139 139
140 /// save the parameter presets to file 140 /// save the parameter presets to file
141 void savePreset(const LLString & name); 141 void savePreset(const std::string & name);
142 142
143 /// Set shader uniforms dirty, so they'll update automatically. 143 /// Set shader uniforms dirty, so they'll update automatically.
144 void propagateParameters(void); 144 void propagateParameters(void);