Skip to content

Commit

Permalink
feat(ui): Add home button at end of test and remove ready_demo_one
Browse files Browse the repository at this point in the history
  • Loading branch information
CaedenPH committed Apr 6, 2024
1 parent acf0596 commit a354b0b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
Binary file removed src/assets/ready_demo_one.png
Binary file not shown.
14 changes: 14 additions & 0 deletions src/routes/results.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,25 @@ export class ProcessResultsPage {
startUp(config, true);
});

const homeButton = this.ui.createButton(
"Go back to home",
this.app.screen.width * 0.5,
this.app.screen.height * 0.80,
this.app.screen.width * 0.6,
this.app.screen.height * 0.2
);
homeButton.on("pointerdown", () => {
// TODO: Send back to home page
this.app.destroy();
startUp(config, false);
});

await this.ui.emulateLoadingTime();

loadingContainer.destroy();

this.app.stage.addChild(viewTestLogsButtonContainer);
this.app.stage.addChild(restartTestButtonContainer);
this.app.stage.addChild(homeButton);
}
}
3 changes: 1 addition & 2 deletions src/ui/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import numbersAndDotsTextureImage from "../assets/numbers_and_dots.png";
import numbersAndDotsInvertedTextureImage from "../assets/numbers_and_dots_inverted.png";
import smallButtonTextureImage from "../assets/small_button.png";

import readyDemoImageOne from "../assets/ready_demo_one.png";
import readyDemoImageTwo from "../assets/ready_demo_two.png";
import readyDemoImageThree from "../assets/ready_demo_three.png";
import readyDemoImageFinal from "../assets/ready_demo_final.png";
Expand Down Expand Up @@ -100,7 +99,7 @@ export class CogSpeedGraphicsHandler {
this.smallButtonTextures = Texture.from(smallButtonTextureImage);
this.largeButtonTexture = Texture.from(largeButtonTextureImage);
this.loadingGearTexture = Texture.from(loadingGearImage);
this.readyDemoTextures = [Texture.from(readyDemoImageOne), Texture.from(readyDemoImageTwo),
this.readyDemoTextures = [Texture.from(readyDemoImageTwo),
Texture.from(readyDemoImageThree), Texture.from(readyDemoImageFinal)];
this.logoTexture = Texture.from(logoWithGearsImage);

Expand Down

0 comments on commit a354b0b

Please sign in to comment.