/* module guestIO - part Editor */ /* by iri : info@irizone.net - january 2004 */ typeof editWin = ObjWin;; typeof beforein = ObjText;; typeof afterin = ObjText;; typeof beforeout = ObjText;; typeof afterout = ObjText;; fun load(l)= _SETtext beforein getInfo l "beforein"; _SETtext afterin getInfo l "afterin"; _SETtext beforeout getInfo l "beforeout"; _SETtext afterout getInfo l "afterout"; 0;; fun save (filename, n)= ("action"::"enter"::nil):: ("action"::"leave"::nil):: ("event"::"msg"::"msg"::nil):: ("beforein"::(_GETtext beforein)::nil):: ("afterin"::(_GETtext afterin)::nil):: ("beforeout"::(_GETtext beforeout)::nil):: ("afterout"::(_GETtext afterout)::nil):: nil;; fun IniEditor(s)= let [440 55] -> [w h] in let startEditor _channel nil nil nil w h WN_MENU EDITOR_NORMAL s "dms/bots/guestio/guestio.dmc" nil nil @load @save nil -> ed in ( set editWin = getEditWin ed; _CRtext _channel editWin 5 5 100 20 ET_ALIGN_LEFT (_locEditor "titrein" nil); set beforein = _CReditLine _channel editWin 105 5 (w-170)/2 20 ET_ALIGN_LEFT|ET_DOWN|ET_AHSCROLL let _GETtext beforein -> s in if s == nil then "" else s; _CRtext _channel editWin 105+(w-170)/2+5 5 50 20 ET_ALIGN_LEFT (_locEditor "login" nil); set afterin = _CReditLine _channel editWin 105+(w-170)/2+5+50+5 5 (w-170)/2 20 ET_ALIGN_LEFT|ET_DOWN|ET_AHSCROLL let _GETtext afterin -> s in if s == nil then "" else s; _CRtext _channel editWin 5 30 100 20 ET_ALIGN_LEFT (_locEditor "titreout" nil); set beforeout = _CReditLine _channel editWin 105 30 (w-170)/2 20 ET_ALIGN_LEFT|ET_DOWN|ET_AHSCROLL let _GETtext beforeout -> s in if s == nil then "" else s; _CRtext _channel editWin 105+(w-170)/2+5 30 50 20 ET_ALIGN_LEFT (_locEditor "login" nil); set afterout = _CReditLine _channel editWin 105+(w-170)/2+5+50+5 30 (w-170)/2 20 ET_ALIGN_LEFT|ET_DOWN|ET_AHSCROLL let _GETtext afterout -> s in if s == nil then "" else s; if s==nil then nil else openDMI ed ); 0;;