/******************************************************************************* Plugin Teleport Editor part Version: 1.0 Authors: Sylvain Huet && Sebastien DENEUX Last update: 21/06/2001 *******************************************************************************/ typeof plugin = S;; typeof class = S;; typeof ed = PluginEditor;; typeof ELcel = ObjText;; typeof ELpos = ObjText;; typeof ELa = ObjText;; proto save = fun [ [Inst r1] ] [[S r1] [S r1] [[S r1]r1] [[S r1]r1]];; fun save(l) = [ nil /* registerF */ nil /* register */ ("plugin"::plugin::nil)::nil /* supplemental Dat */ ("eventC"::(strcat class ".getpositions")::nil):: ("eventC"::(strcat class ".teleport")::nil):: ("action"::(strcat class ".goto")::nil):: nil /* 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; _CRtext _channel ed.PluginEditorEditWin 5 7 80 20 ET_ALIGN_LEFT "Cellule : "; set ELcel = _CReditLine _channel ed.PluginEditorEditWin 85 5 200 20 ET_ALIGN_LEFT|ET_DOWN let getInfo l "room_name" -> string in if (nil == string) then "" else string; _CRtext _channel ed.PluginEditorEditWin 5 32 80 20 ET_ALIGN_LEFT "Position : "; set ELpos = _CReditLine _channel ed.PluginEditorEditWin 85 30 200 20 ET_ALIGN_LEFT|ET_DOWN let getInfo l "position" -> string in if (nil == string) then "" else string; _CRtext _channel ed.PluginEditorEditWin 5 82 80 20 ET_ALIGN_LEFT "Alias : "; set ELa = _CReditLine _channel ed.PluginEditorEditWin 85 80 200 20 ET_ALIGN_LEFT|ET_DOWN let getInfo l "alias" -> string in if (nil == string) then "" else string; 0 ) ;; fun closeedit() = strbuild ("room_name"::(_GETtext ELcel)::nil):: ("position" ::(_GETtext ELpos)::nil):: ("alias" ::(_GETtext ELa)::nil)::nil ;; fun IniPlug(file) = set plugin = file; set class = getInfo strextr _getpack _checkpack file "name"; PlugRegister class @save nil @openedit @closeedit ;;