script, show title screen, begin variable(col) col := load slice collection(slicol:title screen) while(true) do( if(check button by code(sli:continue button, col)) then(load autosave) if(check button by code(sli:new game button, col)) then( load newgame set input handler(@turn picker) break ) if(check button by code(sli:level editor button, col)) then( load leveledit # The following only happens if the load fails set input handler(@level editor mode) break ) wait(1) ) free slice(col) end #----------------------------------------------------------------------- script, check button by code, code, start sl=none, begin variable(sl) sl := lookup slice(code, start sl) exit returning(check button(sl)) end script, check button, sl, begin if(mouse click(left button)) then( if(slice collide point(sl, mouse pixel x, mouse pixel y)) then( exit returning(true) ) ) exit returning(false) end #-----------------------------------------------------------------------