summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelface.cpp
diff options
context:
space:
mode:
authorKadah_Coba <none@none>2011-06-29 23:40:20 -0700
committerKadah_Coba <none@none>2011-06-29 23:40:20 -0700
commitc47d42d9459445d9e9869c49ebe66a0671a3a0a7 (patch)
tree439119cbe0dc332aaf829f4a582c4026804155e2 /indra/newview/llpanelface.cpp
parenta300902494f76b9542c3978c2ca80726cefbc942 (diff)
STORM-1315 Ability to do simple math in numeric edit fields
Diffstat (limited to 'indra/newview/llpanelface.cpp')
-rw-r--r--indra/newview/llpanelface.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index 07c7f35989..de5522c8fb 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -30,6 +30,7 @@
#include "llpanelface.h"
// library includes
+#include "llcalc.h"
#include "llerror.h"
#include "llfocusmgr.h"
#include "llrect.h"
@@ -926,6 +927,16 @@ void LLPanelFace::getState()
getChildView("button apply")->setEnabled(enabled);
}
}
+
+ // Set variable values for numeric expressions
+ LLCalc* calcp = LLCalc::getInstance();
+ calcp->setVar(LLCalc::TEX_U_SCALE, childGetValue("TexScaleU").asReal());
+ calcp->setVar(LLCalc::TEX_V_SCALE, childGetValue("TexScaleV").asReal());
+ calcp->setVar(LLCalc::TEX_U_OFFSET, childGetValue("TexOffsetU").asReal());
+ calcp->setVar(LLCalc::TEX_V_OFFSET, childGetValue("TexOffsetV").asReal());
+ calcp->setVar(LLCalc::TEX_ROTATION, childGetValue("TexRot").asReal());
+ calcp->setVar(LLCalc::TEX_TRANSPARENCY, childGetValue("ColorTrans").asReal());
+ calcp->setVar(LLCalc::TEX_GLOW, childGetValue("glow").asReal());
}
else
{