/* CLOUVION - part Editor - 03/2004 */ /* by iri - http://www.irizone.net */ typeof editWin = ObjWin;; typeof wordList = ObjText;; typeof background = ObjText;; var colorTexte = 0;; fun save (filename, n)= ("action"::"start"::"start"::nil):: ("action"::"destroy"::"destroy"::nil):: ("action"::"!chgLogin"::nil):: ("actionC"::"show"::"show"::nil):: ("actionC"::"close"::"close"::nil):: ("event"::"destroyed"::"destroyed"::nil):: ("event"::"in"::"in"::nil):: ("event"::"newScore"::nil):: ("event"::"newTopScore"::nil):: ("eventC"::"endTime"::nil):: ("eventC"::"clicReady"::nil):: ("eventC"::"won"::nil):: ("eventC"::"lost"::nil):: ("wordList"::(_GETtext wordList)::nil):: ("background"::(_GETtext background)::nil):: ("colorTexte"::(itoa colorTexte)::nil):: ("zoneC"::"clouvion"::nil):: nil;; fun load (l)= _SETtext wordList getInfo l "wordList"; _SETtext background getInfo l "background"; set colorTexte = atoi getInfo l "colorTexte"; 0;; fun _paintE(a,b)= _PAINTrectangle editWin 110 55 235 20 DRAW_SOLID 1 0 DRAW_SOLID colorTexte;; fun _endColor(c)= if c != nil then set colorTexte = c else nil;; fun color(btn, u)= _CRcolorMap _channel editWin 100 100 "Choose color" @_endColor (if colorTexte == nil then 0 else colorTexte); 0;; fun _bmp(box, u, path)= _SETtext background _PtoScol path; 0;; fun bmp(btn, u)= _DLGrflopen _DLGOpenFile _channel editWin _GETtext background nil "BITMAP\0*.bmp;*.jpg\0\0" @_bmp 0; 0;; fun _liste(box, u, path)= _SETtext wordList _PtoScol path; 0;; fun liste(btn, u)= _DLGrflopen _DLGOpenFile _channel editWin _GETtext wordList nil "text\0*.txt\0\0" @_liste 0; 0;; fun IniEditor (s)= let startEditor _channel nil nil nil 355 80 WN_NORMAL EDITOR_NORMAL s "dms/games/clouvion/clouvion.dmc" nil nil @load @save nil -> ed in ( set editWin = getEditWin ed; _CBbutton _CRbutton _channel editWin 5 5 100 20 0 "WordList :" @liste 0; set wordList = _CRtext _channel editWin 110 5 235 20 ET_DOWN|ET_AHSCROLL ""; _CBbutton _CRbutton _channel editWin 5 30 100 20 0 "Background :" @bmp 0; set background = _CRtext _channel editWin 110 30 235 20 ET_DOWN|ET_AHSCROLL ""; _CBbutton _CRbutton _channel editWin 5 55 100 20 0 "Color" @color 0; _CBwinPaint editWin @_paintE nil; if s==nil then nil else openDMI ed ); 0;;