/* Fog Plugin Editor - DMS2 - October 99 - by Sébastien DENEUX */ typeof plugin=S;; typeof class=S;; typeof ed = PluginEditor;; typeof softfog=ObjCheck;; typeof initState=ObjCheck;; typeof keepDynamicChanges=ObjCheck;; fun InstName(UI)=UI.nameInst;; proto save=fun [ [Inst r1] ] [[S r1] [S r1] [[S r1]r1] [[S r1]r1]];; /*----------------*/ fun openedit(win,param)= let strextr param -> l in let _GETwindowSizePosition win -> [w h x y] in ( set ed = startPluginEditor _channel win 0 0 w h WN_CHILDINSIDE|WN_NOBORDER class; set softfog = _SETcheck _CRcheck _channel ed.PluginEditorEditWin 5 5 200 20 0 "Enable fog in 3D soft mode" let getInfo l "softfog" -> tmp in if tmp==nil then 1 else atoi tmp; set initState = _SETcheck _CRcheck _channel ed.PluginEditorEditWin 5 30 200 20 0 "Enable fog at startup" let getInfo l "initState" -> tmp in if tmp==nil then 1 else atoi tmp; set keepDynamicChanges = _SETcheck _CRcheck _channel ed.PluginEditorEditWin 5 55 200 20 0 "Keep Dynamic Changes" let getInfo l "keepDynamicChanges" -> tmp in if tmp==nil then 0 else atoi tmp; 0 );; /*----------------*/ fun closeedit()= strbuild ("softfog"::(itoa _GETcheck softfog)::nil):: ("initState"::(itoa _GETcheck initState)::nil):: ("keepDynamicChanges"::(itoa _GETcheck keepDynamicChanges)::nil)::nil;; /*----------------*/ fun suppactions(l)= if l == nil then nil else let l -> [UI nl] in let (InstName UI) -> name in ("action"::(strcatn name::".enableFogS"::nil)::nil):: ("action"::(strcatn name::".disableFogS"::nil)::nil):: ("actionC"::(strcatn name::".enableFog"::nil)::nil):: ("actionC"::(strcatn name::".disableFog"::nil)::nil):: (suppactions nl);; /*----------------*/ fun save(l)= if l==nil then [nil nil nil nil] else [ nil /* registerF */ nil /* register */ ("plugin"::plugin::nil)::nil /* supplemental Dat */ suppactions l /* supplemental Dmi */ ];; /*----------------*/ fun IniPlug(file)= set plugin=file; set class=getInfo strextr _getpack _checkpack file "name"; PlugRegister class @save nil @openedit @closeedit;;