function draw_icon(pos, id, select) {
  var x = ((pos % 3)*80) + 2; 
  var y = 80;

  g.setColor(-1);
  g.drawImage(s.read(apps[id].icon),x+2,y+11,{scale:1.625});

  if (select) {
    g.setColor(1,1,1).drawRect(x,y,x+79,y+99); // white bounding box
  }
}
// assumes we have at least 2 apps
assumes we have at least 2 apps
assumes we have at least 2 apps
function draw_icon(pos, id, select) {
  var x = ((pos % 3)*80) + 2; 
  var y = 80;
  g.setColor(-1);
  g.drawImage(s.read(apps[id].icon),x+2,y+11,{scale:1.625});
  if (select) {
    g.setColor(1,1,1).drawRect(x,y,x+79,y+99); 
  }
}
function draw_icon ( pos , id , select ) { var x = ( ( pos % 3 ) * 80 ) + 2 ; var y = 80 ; g . setColor ( - 1 ) ; g . drawImage ( s . read ( apps [ id ] . icon ) , x + 2 , y + 11 , { scale : 1.625 } ) ; if ( select ) { g . setColor ( 1 , 1 , 1 ) . drawRect ( x , y , x + 79 , y + 99 ) ; } }
assumes we have at least 2 apps
assumes we have at least 2 apps
// white bounding box