File source

<?php
class TestScreen extends Screen
  protected 
$id "test";
  protected 
$i 1;
  
  function 
__construct(){
    
$this->touchPush("menu"0,0,160,80);
    
$this->touchPush("x",0,80,160,80"next");
  }


  function 
render(){
    if(
$this->touched("menu")){
        echo 
"touched menu\n";
        return 
$this->screen("weather");
    }
    
//$img = screen();
    //imagettfcenter($img, 50, 0, 160/2, 160, $black, "font.ttf", /*$text*/ $this->i);
    
$img imagecreatefromjpeg("imgs/".$this->i.".jpg");
    
$this->timeout(5000);
    return 
$this->image($img);
  }

  function 
handleAction($a){
    if(
$a == "next"){
        
$this->i++;
        if(
$this->4$this->1;
    }else{
        return 
false;
    }
    return 
true;
  }

}