/* Loto Editor - DMS - June 2000 - by Julien Zorko */ typeof cbMaxGames = ObjBox;; typeof cbMaxPlayers = ObjBox;; typeof cbLife = ObjBox;; typeof cbBegin = ObjBox;; typeof cbFlow = ObjBox;; typeof cbEnd = ObjBox;; fun _AddListToCombo(combo,l)= let l -> [first next] in if first==nil then 0 else ( _ADDcombo combo 0 first; _AddListToCombo combo next; 0 );; fun _GetCbTxt(combo)= let _GETcombo combo ->[_ txt] in txt;; /*************************************************************/ fun save(s,n)= ("action"::"start"::nil):: /*("action"::"kill"::nil)::*/ ("action"::"destroy"::nil):: ("action"::"!changeLogin"::nil):: ("action"::"register"::nil):: ("action"::"unregister"::nil):: ("actionC"::"show"::nil):: ("actionC"::"hide"::nil):: ("action"::"regadmin"::nil):: ("event"::"entering"::"entering"::nil):: ("eventC"::"in"::"in"::nil):: /*("event"::"killed"::"killed"::nil)::*/ ("event"::"score"::"score"::nil):: ("event"::"destroyed"::"destroyed"::nil):: ("eventC"::"shown"::"shown"::nil):: ("eventC"::"hidden"::"hidden"::nil):: ("eventC"::"select"::"select"::nil):: ("eventC"::"log"::"log"::nil):: ("zoneC"::"Board"::nil):: ("zoneC"::"Admin"::nil):: ("Parameters"::nil):: ("Vmaxgames"::(_GetCbTxt cbMaxGames)::nil):: ("Vmaxplayers"::(_GetCbTxt cbMaxPlayers)::nil):: ("Vlife"::(_GetCbTxt cbLife)::nil):: ("Vbegin"::(_GetCbTxt cbBegin)::nil):: ("Vflow"::(_GetCbTxt cbFlow)::nil):: ("Vend"::(_GetCbTxt cbEnd)::nil):: nil;; fun load(p)= if p==nil then ( _SSELcombo cbLife "60"; _SSELcombo cbBegin "20"; _SSELcombo cbEnd "10"; _SSELcombo cbFlow "50"; _SSELcombo cbMaxGames "10"; _SSELcombo cbMaxPlayers "5"; 0 ) else ( _SSELcombo cbLife getInfo p "Vlife"; _SSELcombo cbBegin getInfo p "Vbegin"; _SSELcombo cbEnd getInfo p "Vend"; _SSELcombo cbFlow getInfo p "Vflow"; _SSELcombo cbMaxGames getInfo p "Vmaxgames"; _SSELcombo cbMaxPlayers getInfo p "Vmaxplayers"; 0 );; fun IniEditor (s)= let startEditor _channel nil nil nil 315 150 WN_NORMAL EDITOR_NORMAL s "dms/games/loto/loto.dmc" nil nil @load @save nil -> ed in let getEditWin ed -> editWin in ( set cbMaxGames = _CRcombo _channel editWin 265 0 40 100 CB_NOEDIT|CB_AHSCROLL|CB_DOWN ""; set cbMaxPlayers = _CRcombo _channel editWin 265 25 40 100 CB_NOEDIT|CB_AHSCROLL|CB_DOWN ""; set cbLife = _CRcombo _channel editWin 265 50 40 100 CB_NOEDIT|CB_AHSCROLL|CB_DOWN ""; set cbBegin = _CRcombo _channel editWin 265 75 40 100 CB_NOEDIT|CB_AHSCROLL|CB_DOWN ""; set cbFlow = _CRcombo _channel editWin 265 100 40 100 CB_NOEDIT|CB_AHSCROLL|CB_DOWN ""; set cbEnd = _CRcombo _channel editWin 265 125 40 100 CB_NOEDIT|CB_AHSCROLL|CB_DOWN ""; _AddListToCombo cbMaxGames "25"::"20"::"15"::"10"::"5"::nil; _AddListToCombo cbMaxPlayers "10"::"9"::"8"::"7"::"6"::"5"::"4"::"3"::"2"::nil; _AddListToCombo cbLife "60"::"50"::"40"::"30"::"20"::"10"::nil; _AddListToCombo cbBegin "35"::"30"::"25"::"20"::"15"::"10"::"5"::nil; _AddListToCombo cbFlow "60"::"55"::"50"::"45"::"40"::"35"::"30"::"25"::"20"::"15"::"10"::nil; _AddListToCombo cbEnd "10"::"9"::"8"::"7"::"6"::"5"::"4"::"3"::"2"::"1"::nil; _CRtext _channel editWin 10 5 255 20 ET_ALIGN_RIGHT _locEditor "MAX_NUMBER_OF_GAMES" nil; _CRtext _channel editWin 10 30 255 20 ET_ALIGN_RIGHT _locEditor "MAX_NUMBER_OF_PLAYERS" nil; _CRtext _channel editWin 10 55 255 20 ET_ALIGN_RIGHT _locEditor "TIME_AUTOKILL_GAME" nil; _CRtext _channel editWin 10 80 255 20 ET_ALIGN_RIGHT _locEditor "TIME_BEFORE_BEGIN_GAME" nil; _CRtext _channel editWin 10 105 255 20 ET_ALIGN_RIGHT _locEditor "TIME_BETWEEN_TOKENS" nil; _CRtext _channel editWin 10 130 255 20 ET_ALIGN_RIGHT _locEditor "TIME_BEFORE_ENDING_GAME" nil; _SSELcombo cbLife "60"; _SSELcombo cbBegin "20"; _SSELcombo cbEnd "10"; _SSELcombo cbFlow "50"; _SSELcombo cbMaxGames "10"; _SSELcombo cbMaxPlayers "5"; if s==nil then nil else openDMI ed; 0) ;;