diff --git a/src/main/kotlin/group/ouroboros/potrogue/main.kt b/src/main/kotlin/group/ouroboros/potrogue/main.kt index e2a2564..cd1f235 100644 --- a/src/main/kotlin/group/ouroboros/potrogue/main.kt +++ b/src/main/kotlin/group/ouroboros/potrogue/main.kt @@ -5,7 +5,7 @@ import group.ouroboros.potrogue.view.StartView import org.hexworks.zircon.api.SwingApplications //Important Values -const val GAME_ID = "potrogue"; +const val GAME_ID = "PotRogue"; const val GAME_VER = "0.1.0-DEV"; fun main(args: Array) { diff --git a/src/main/kotlin/group/ouroboros/potrogue/view/StartView.kt b/src/main/kotlin/group/ouroboros/potrogue/view/StartView.kt index eddaea6..6bf980c 100644 --- a/src/main/kotlin/group/ouroboros/potrogue/view/StartView.kt +++ b/src/main/kotlin/group/ouroboros/potrogue/view/StartView.kt @@ -9,6 +9,7 @@ import org.hexworks.zircon.api.component.ColorTheme import org.hexworks.zircon.api.component.ComponentAlignment import org.hexworks.zircon.api.grid.TileGrid import org.hexworks.zircon.api.view.base.BaseView +import kotlin.system.exitProcess class StartView (private val grid: TileGrid, theme: ColorTheme = GameConfig.THEME) : BaseView(grid, theme) { init { @@ -37,15 +38,34 @@ class StartView (private val grid: TileGrid, theme: ColorTheme = GameConfig.THEM .withDecorations(box(), shadow()) .build() - //TODO - //move this on to a configuration screen for world/player customization before PlayView, for now basic gameplay is in order though. + val configButton = Components.button() + .withAlignmentAround(startButton, ComponentAlignment.BOTTOM_CENTER) + .withText("CONFIG") + .withDecorations(box(), shadow()) + .build() + + val exitButton = Components.button() + .withAlignmentAround(configButton, ComponentAlignment.BOTTOM_CENTER) + .withText("EXIT") + .withDecorations(box(), shadow()) + .build() + + //TODO: move this on to a configuration screen for world/player customization before PlayView, for now basic gameplay is in order though. //Once the start button is pressed, move on to the PlayView startButton.onActivated { replaceWith(PlayView(grid)) } + configButton.onActivated { + TODO() + } + + exitButton.onActivated { + exitProcess(0) + } + // We can add multiple components at once //Bake The Cake - screen.addComponents(header, startButton) + screen.addComponents(header, startButton, configButton, exitButton) } } \ No newline at end of file