/* photo3 Editor - DMS - march 99 - by Sylvain HUET */ /* Rev. Aug. '98 - by Marc BARILLEY */ /* rev. June 00 - by Sébastien DENEUX */ typeof ed = Editor;; typeof m3dItemRef=ObjText;; typeof m3DItemRef=ObjButton;; typeof defaultAvBrowserPath=ObjText;; /*----------------*/ fun load (l)= _SETtext m3dItemRef getInfo l "m3dItemRef"; _SETtext defaultAvBrowserPath getInfo l "defaultAvBrowserPath"; 0;; /*----------------*/ fun save (filename, n)= ("action"::"start"::"start"::nil):: ("action"::"getPlugin"::"getPlugin"::nil):: ("action"::"reload"::"reload"::nil):: ("action"::"!ChgLogin"::"!ChgLogin"::nil):: ("actionC"::"showInterface"::"showInterface"::nil):: ("event"::"changed"::nil):: ("eventC"::"in"::nil):: ("actionC"::"changeView"::nil):: ("zoneC"::"Av3dInterface"::nil):: ("zoneC"::"AvatarView"::nil):: ("zoneC"::"Button"::nil):: ("m3dItemRef"::(_GETtext m3dItemRef)::nil):: ("defaultAvBrowserPath"::(_GETtext defaultAvBrowserPath)::nil):: nil;; /*----------------*/ fun rflOpenFile (dlg, objtxt_f, pack)= if pack==nil then nil else let objtxt_f -> [txt f] in ( _SETtext txt _PtoScol pack; exec f with [nil _PtoScol pack]; );; /*----------------*/ /*open a dialog box to choose a m3d file*/ fun rflBrowseFile (blurp, objtxt_f)= let objtxt_f -> [objtxt _] in let getPathFile _GETtext objtxt "" -> [dir _] in _DLGrflopen _DLGOpenFile _channel ed.EditorEditWin dir "" "m3d file (*.m3d)\0*.m3d\0all (*.*)\0*.*\0\0" @rflOpenFile objtxt_f;; /*----------------*/ fun IniEditor(filename)= set ed = startEditor _channel nil 0 0 350 70 WN_MENU EDITOR_NORMAL filename "Dms/Avatar/av3d/av3d.dmc" "Dms/Avatar/av3d/help.txt" "Dms/Avatar/av3d/av3d.bmp" @load @save nil; _CRtext _channel ed.EditorEditWin 5 5 160 20 ET_ALIGN_LEFT _locEditor "ITEM_REF" nil; set m3dItemRef= _CReditLine _channel ed.EditorEditWin 200 5 130 20 ET_DOWN|ET_AHSCROLL "meshAv3d"; _CRtext _channel ed.EditorEditWin 5 30 160 20 ET_ALIGN_LEFT _locEditor "DEFAULT_BROWSER_PATH" nil; set defaultAvBrowserPath= _CReditLine _channel ed.EditorEditWin 200 30 130 20 ET_DOWN|ET_AHSCROLL "Avatars/"; if filename==nil then nil else openDMI ed; 0;;