to mousepressed ; ; hard stuff, look to see which grid item mouse is over, ; when it was pressed ; localmake "curpos mousepos localmake "x item 1 :curpos localmake "y item 2 :curpos localmake "suggest -1 if (AND :x>-150 :x<-50 :y>-150 :y<-50) [make "suggest 0] if (AND :x>-50 :x<50 :y>-150 :y<-50) [make "suggest 1] if (AND :x>50 :x<150 :y>-150 :y<-50) [make "suggest 2] if (AND :x>-150 :x<-50 :y>-50 :y<50) [make "suggest 3] if (AND :x>-50 :x<50 :y>-50 :y<50) [make "suggest 4] if (AND :x>50 :x<150 :y>-50 :y<50) [make "suggest 5] if (AND :x>-150 :x<-50 :y>50 :y<150) [make "suggest 6] if (AND :x>-50 :x<50 :y>50 :y<150) [make "suggest 7] if (AND :x>50 :x<150 :y>50 :y<150) [make "suggest 8] if (not :suggest<0) [ ; ; we don't want to do the test if :suggest is –1 ; so we do this in the part of if that only gets ; executed when :suggest is >= 0. ; if (grid.empty :suggest) [ make "selection :suggest ] ] end |