()
| 434 | } |
| 435 | |
| 436 | createButtons(){ |
| 437 | var vst=this; |
| 438 | |
| 439 | var startx=layout.CX; |
| 440 | var starty=layout.CY+250; |
| 441 | |
| 442 | var button_nextslide = new Button("button_nextslide",loader.resources["images/buttons/next.png"].texture,layout.NEXTSLIDE_X,layout.NEXTSLIDE_Y,true); |
| 443 | var button_prevslide = new Button("button_prevslide",loader.resources["images/buttons/back.png"].texture,layout.PREVSLIDE_X,layout.NEXTSLIDE_Y,true); |
| 444 | var button_start = new Button("button_start",loader.resources["images/buttons/start.png"].texture,startx,starty,true); |
| 445 | |
| 446 | var button_backfromcalc = new Button("button_backfromcalc",loader.resources["images/buttons/back.png"].texture,layout.PREVSLIDE_X,layout.NEXTSLIDE_Y,true); |
| 447 | var button_calc2sand = new Button("button_calc2sand",loader.resources["images/buttons/next.png"].texture,layout.NEXTSLIDE_X,layout.NEXTSLIDE_Y,true); |
| 448 | var text_calc2sand = new PIXI.Text("Click next to go"+'\n'+ "to sandbox mode!", textstyles.default) |
| 449 | text_calc2sand.name="text_calc2sand"; |
| 450 | text_calc2sand.x=layout.NEXTSLIDE_X+100; |
| 451 | text_calc2sand.y=layout.NEXTSLIDE_Y-20; |
| 452 | |
| 453 | var homebutton = new Button("homebutton",loader.resources["images/buttons/home.png"].texture,30,layout.HEADER_HEIGHT/2,false) |
| 454 | var gotoneuron = new Button("gotoneuron",loader.resources["images/buttons/gotoneuron.png"].texture,window.innerWidth-720,layout.HEADER_HEIGHT/2,false) |
| 455 | var gotoforward = new Button("gotoforward",loader.resources["images/buttons/gotoforward.png"].texture,window.innerWidth-570,layout.HEADER_HEIGHT/2,false) |
| 456 | var gotobackprop = new Button("gotobackprop",loader.resources["images/buttons/gotobackprop.png"].texture,window.innerWidth-420,layout.HEADER_HEIGHT/2,false) |
| 457 | var gotocalc = new Button("gotocalc",loader.resources["images/buttons/gotocalc.png"].texture,window.innerWidth-270,layout.HEADER_HEIGHT/2,false) |
| 458 | var gotosand = new Button("gotosand",loader.resources["images/buttons/sand.png"].texture,window.innerWidth-100,layout.HEADER_HEIGHT/2 +1,false,0xcdff94) |
| 459 | |
| 460 | |
| 461 | |
| 462 | this.app.stage.addChild(button_nextslide, button_prevslide, button_start, button_backfromcalc,button_calc2sand, |
| 463 | text_calc2sand, homebutton,gotoneuron,gotoforward,gotobackprop,gotocalc,gotosand); |
| 464 | |
| 465 | this.app.stage.getChildByName("homebutton").on('click', function(e){ |
| 466 | vst.currentSlide=0; |
| 467 | vst.drawSlide(); |
| 468 | |
| 469 | }); |
| 470 | |
| 471 | this.app.stage.getChildByName("homebutton").on('tap', function(e){ |
| 472 | vst.currentSlide=0; |
| 473 | vst.drawSlide(); |
| 474 | |
| 475 | }); |
| 476 | |
| 477 | this.app.stage.getChildByName("button_start").on('click', function(e){ |
| 478 | if(vst.currentSlide+1<vst.slideList.length){ |
| 479 | vst.currentSlide=vst.currentSlide+1; |
| 480 | vst.drawSlide(); |
| 481 | } |
| 482 | }); |
| 483 | |
| 484 | this.app.stage.getChildByName("button_start").on('tap', function(e){ |
| 485 | if(vst.currentSlide+1<vst.slideList.length){ |
| 486 | vst.currentSlide=vst.currentSlide+1; |
| 487 | vst.drawSlide(); |
| 488 | } |
| 489 | }); |
| 490 | |
| 491 | this.app.stage.getChildByName("button_nextslide").on('click', function(e){ |
| 492 | |
| 493 | if(vst.currentSlide+1<vst.slideList.length){ |
no test coverage detected