struct LightEdit = [ LIGHTEDITwin : ObjWin, LIGHTEDITcheck : ObjCheck, LIGHTEDITslider : ObjSlider ] mkLightEdit;; typeof LightEditList = [LightEdit r1];; fun LIGHTEDIT_Clear (light, param) = _DSslider light.LIGHTEDITslider; _DSwindow light.LIGHTEDITwin ;; fun LIGHTEDIT_Close (light, param) = LIGHTEDIT_Clear light param; set LightEditList = remove_from_list LightEditList light; 0 ;; fun _destroyLightWin(win, light)= LIGHTEDIT_Close light nil;; fun _okLightButton(b,param)= let param -> [light end] in { exec end with [(_GETcheck light.LIGHTEDITcheck) ftoi _GETsliderLeft light.LIGHTEDITslider]; LIGHTEDIT_Close light nil };; fun _cancelLightButton(b,light)= LIGHTEDIT_Close light nil;; fun _CRlightMap(ch,father,x,y,title,end,islight,light,checktext, base1, base2)= let _CRwindow ch father x y 400 95 WN_NORMAL title -> win in let _CRslider ch win nil 10 0 380 50 0xff0000 (itof base1) (itof base2) (itof light) (itof light) nil SLIDER_INTER_FIXED|SLIDER_DRAW_SCALE|SLIDER_DRAW_VALUE|SLIDER_BUTTON -> slider in let _CRcheck ch win 5 55 190 15 0 checktext -> check in let _CRbutton ch win 5 75 70 20 0 _loc this "OK_BUTTON" nil -> okbutton in let _CRbutton ch win 220 75 70 20 0 _loc this "CANCEL_BUTTON" nil -> cancelbutton in let mkLightEdit [win check slider] -> light in { _SETsliderPrecisionStep slider (itof 1); _SETsliderPrecisionMark slider 0; _SETcheck check islight; _CBwinDestroy win @_destroyLightWin light; _CBbutton okbutton @_okLightButton [light end]; _CBbutton cancelbutton @_cancelLightButton light; set LightEditList = light::LightEditList; 0 };; fun LIGHTEDIT_CloseAll () = apply_on_list LightEditList @LIGHTEDIT_Clear nil; set LightEditList = nil; 0 ;;