Skip to content

Commit

Permalink
summary scene
Browse files Browse the repository at this point in the history
  • Loading branch information
awcz committed Apr 15, 2024
1 parent f2d08bb commit 15cf45c
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/commonMain/kotlin/com/github/awcz/torch/scene/SummaryScene.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.github.awcz.torch.scene

import korlibs.korge.input.onClick
import korlibs.korge.scene.Scene
import korlibs.korge.ui.uiButton
import korlibs.korge.ui.uiText
import korlibs.korge.view.SContainer
import korlibs.korge.view.positionX
import korlibs.korge.view.positionY
import korlibs.math.geom.Size

class SummaryScene : Scene() {

override suspend fun SContainer.sceneMain() {
println("summary")
uiText("Points: -1").positionY(this.height / 2 - 20).positionX(this.width / 2 - 50)
uiButton("Play again", Size(100, 15)) {
onClick { sceneContainer.changeTo { Scene1() } }
}.positionY(this.height / 2).positionX(this.width / 2 - 50)
uiButton("Go to main menu", Size(100, 15)) {
onClick { throw NotImplementedError() }
}.positionY(this.height / 2 + 20).positionX(this.width / 2 - 50)
}


}

0 comments on commit 15cf45c

Please sign in to comment.