/* Rotate Plugin Editor - DMS - Mar 99 - by Sylvain HUET */ /* modified - Jun 99 - by Christophe LOREK */ /* plugin Movobjet par iri - http://www.irizone.net */ typeof plugin=S;; typeof class=S;; typeof ed = PluginEditor;; typeof AngularX = ObjCheck;; typeof AngularY = ObjCheck;; typeof AngularZ = ObjCheck;; typeof LBframerate = ObjText;; typeof Framerate = ObjText;; typeof BoxOK = ObjCheck;; typeof deltaBoxX = ObjText;; typeof deltaBoxY = ObjText;; typeof deltaBoxZ = ObjText;; proto save=fun [ [Inst r1] ] [[S r1] [S r1] [[S r1]r1] [[S r1]r1]];; fun savesuppdmi(l) = if l==nil then nil /* supplemental Dmi */ else let l->[a n] in ("actionC"::(strcat a.nameInst ".activate")::nil):: ("actionC"::(strcat a.nameInst ".desactivate")::nil):: ("eventC"::(strcat a.nameInst ".activated")::nil):: ("eventC"::(strcat a.nameInst ".desactivated")::nil):: savesuppdmi n;; fun save(l)= if l==nil then [nil nil nil nil] else [ nil /* registerF */ nil /* register */ ("plugin"::plugin::nil)::nil /* supplemental Dat */ savesuppdmi l /* supplemental Dmi */ ];; 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 AngularX = _CRcheck _channel ed.PluginEditorEditWin 5 5 w-10 20 CH_LEFT "Axe X "; let atoi getInfo l "axeX" -> int in _SETcheck AngularX if (nil == int) then 0 else int; set AngularY = _CRcheck _channel ed.PluginEditorEditWin 5 30 w-10 20 CH_LEFT "Axe Y "; let atoi getInfo l "axeY" -> int in _SETcheck AngularY if (nil == int) then 0 else int; set AngularZ = _CRcheck _channel ed.PluginEditorEditWin 5 55 w-10 20 CH_LEFT "Axe Z "; let atoi getInfo l "axeZ" -> int in _SETcheck AngularZ if (nil == int) then 0 else int; set LBframerate = _CRtext _channel ed.PluginEditorEditWin 5 80 80 20 ET_ALIGN_LEFT "framerate : "; set Framerate = _CReditLine _channel ed.PluginEditorEditWin 85 80 w-85 20 ET_ALIGN_LEFT|ET_DOWN|ET_NUMBER let getInfo l "Framerate" -> string in if (nil == string) then "1" else string; _CRtext _channel ed.PluginEditorEditWin 5 115 w-10 20 ET_ALIGN_LEFT "Concernant les collisions : "; set BoxOK = _CRcheck _channel ed.PluginEditorEditWin 5 140 w-10 20 ET_ALIGN_LEFT "Prendre en compte la boîte de collision ? "; let atoi getInfo l "boxok" -> int in _SETcheck BoxOK if (nil == int) then 0 else int; _CRtext _channel ed.PluginEditorEditWin 5 165 80 20 ET_ALIGN_LEFT "Delta X : "; set deltaBoxX = _CReditLine _channel ed.PluginEditorEditWin 85 165 w-85 20 ET_ALIGN_LEFT|ET_DOWN|ET_NUMBER let getInfo l "deltax" -> string in if (nil == string) then "0" else string; _CRtext _channel ed.PluginEditorEditWin 5 190 80 20 ET_ALIGN_LEFT "Delta Y : "; set deltaBoxY = _CReditLine _channel ed.PluginEditorEditWin 85 190 w-85 20 ET_ALIGN_LEFT|ET_DOWN|ET_NUMBER let getInfo l "deltay" -> string in if (nil == string) then "0" else string; _CRtext _channel ed.PluginEditorEditWin 5 215 80 20 ET_ALIGN_LEFT "Delta Z : "; set deltaBoxZ = _CReditLine _channel ed.PluginEditorEditWin 85 215 w-85 20 ET_ALIGN_LEFT|ET_DOWN|ET_NUMBER let getInfo l "deltaz" -> string in if (nil == string) then "0" else string; 0 );; fun closeedit() = strbuild ("axeX"::(itoa _GETcheck AngularX)::nil):: ("axeY"::(itoa _GETcheck AngularY)::nil):: ("axeZ"::(itoa _GETcheck AngularZ)::nil):: ("Framerate"::(_GETtext Framerate)::nil):: ( "boxok" :: (itoa _GETcheck BoxOK) :: nil ) :: ( "deltax" :: (_GETtext deltaBoxX) :: nil ) :: ( "deltay" :: (_GETtext deltaBoxY) :: nil ) :: ( "deltaz" :: (_GETtext deltaBoxZ) :: nil ) :: nil;; fun IniPlug(file)= set plugin=file; set class=getInfo strextr _getpack _checkpack file "name"; PlugRegister class @save nil @openedit @closeedit;;