Skip to content

Commit

Permalink
feat: Also add the results table to the summary page
Browse files Browse the repository at this point in the history
  • Loading branch information
CaedenPH committed Aug 22, 2024
1 parent 3ebfa2d commit 62cb0a1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/routes/results.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,9 @@ export class ProcessResultsPage {
}

public async showSummaryPage(data: { [key: string]: any }, config: Config) {
const resultsTableContainer = this.ui.createResultsTable(data.sleepData.fatigueLevel, data.cognitiveProcessingIndex, data.blockingRoundDuration, this.app.screen.height * 0.10);
this.app.stage.addChild(resultsTableContainer)

const textSummary = new Text(`Test summary
Test version: ${config.version}
Account ID: ...
Expand All @@ -234,15 +237,15 @@ export class ProcessResultsPage {
wordWrapWidth: this.app.screen.width * 0.8
});
textSummary.position.set(this.app.screen.width * 0.5,
this.app.screen.height * 0.18);
this.app.screen.height * 0.35);

textSummary.anchor.set(0.5);
this.app.stage.addChild(textSummary);

const backButtonContainer = this.ui.createButton(
"Go back",
this.app.screen.width * 0.5,
this.app.screen.height * 0.85,
this.app.screen.height * 0.9,
this.app.screen.width * 0.6,
this.app.screen.height * 0.2
);
Expand All @@ -256,8 +259,8 @@ export class ProcessResultsPage {
}

const graphSprite = new Sprite(this.resultsGraphTexture);
graphSprite.position.set(this.app.screen.width * 0.5, this.app.screen.height * 0.55)
graphSprite.scale.set(0.7);
graphSprite.position.set(this.app.screen.width * 0.5, this.app.screen.height * 0.65)
graphSprite.scale.set(0.5);
graphSprite.anchor.set(0.5, 0.5)

this.app.stage.addChild(graphSprite);
Expand Down

0 comments on commit 62cb0a1

Please sign in to comment.