diff options
author | deva <deva> | 2008-06-03 14:45:48 +0000 |
---|---|---|
committer | deva <deva> | 2008-06-03 14:45:48 +0000 |
commit | 0febf6ea9cbd1a6e04e41339fc46d2e6b07da5e7 (patch) | |
tree | da9cee1a15609b8aa2ed556160c5660819621db2 /server/xml | |
parent | bb3fad646f94739a876869464a484c99795bce61 (diff) |
LUA rocks
Diffstat (limited to 'server/xml')
-rw-r--r-- | server/xml/example2.xml | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/server/xml/example2.xml b/server/xml/example2.xml index ddcc4e6..826b694 100644 --- a/server/xml/example2.xml +++ b/server/xml/example2.xml @@ -24,8 +24,10 @@ </maps> <luaprograms> <luaprogram name="theanswer"> - if( tonumber(value) == 42 ) + fisk = getValue('sphere') + if( tonumber(fisk) == tonumber(value) ) then + setValue('cyl', value) return true else return false @@ -40,15 +42,15 @@ <frame name="linse_frame" caption="Linser:" layout="vbox"> <frame name="linse_framea" layout="hbox"> <label name="a" width="300" caption="Akse rotation:"/> - <lineedit name="linse4" regexp="[24]*" map="axis" lua="theanswer" value="90K"/> + <lineedit name="axis" regexp="[24]*" map="axis" lua="theanswer" value="244"/> </frame> <frame name="linse_frameb" layout="hbox"> <label name="b" width="300" caption="Sphere:"/> - <lineedit name="linse2" regexp="-{0,1}[0-9]{1,3}\.[0-9]{1,3}" map="sphere" value="90K"/> + <lineedit name="sphere" regexp="[24]*" map="sphere" value="42"/> </frame> <frame name="linse_framec" layout="hbox"> - <label name="c" width="300" caption="Sphere:"/> - <lineedit name="linse3" regexp="-{0,1}[0-9]{1,3}\.[0-9]{1,3}" map="cyl" value="90K"/> + <label name="c" width="300" caption="Cyl:"/> + <lineedit name="cyl" regexp="[24]*" map="cyl" value=""/> </frame> </frame> <frame name="buttons" layout="hbox"> |