From 7e9eb21f83227c11330e09770141f9a693ad0e3d Mon Sep 17 00:00:00 2001 From: LimePotato Date: Sat, 28 Oct 2023 13:47:08 -0600 Subject: [PATCH] Working view and tileset --- .../kotlin/group/ouroboros/potrogue/main.kt | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/src/main/kotlin/group/ouroboros/potrogue/main.kt b/src/main/kotlin/group/ouroboros/potrogue/main.kt index b2b2abd..e31fab1 100644 --- a/src/main/kotlin/group/ouroboros/potrogue/main.kt +++ b/src/main/kotlin/group/ouroboros/potrogue/main.kt @@ -1,12 +1,11 @@ package group.ouroboros.potrogue -import org.hexworks.zircon.api.ColorThemes +import group.ouroboros.potrogue.view.StartView +import org.hexworks.zircon.api.CP437TilesetResources import org.hexworks.zircon.api.ColorThemes.cyberpunk -import org.hexworks.zircon.api.Components import org.hexworks.zircon.api.SwingApplications import org.hexworks.zircon.api.application.AppConfig -import org.hexworks.zircon.api.component.ComponentAlignment import org.hexworks.zircon.api.screen.Screen //Important Values @@ -20,6 +19,7 @@ fun main(args: Array) { val grid = SwingApplications.startTileGrid( AppConfig.newBuilder() .withTitle("$GAME_ID | $GAME_VER") + .withDefaultTileset(CP437TilesetResources.rogueYun16x16()) .build() ) val screen = Screen.create(grid) @@ -37,15 +37,5 @@ fun main(args: Array) { .build()) */ - //Add a component to the screen, in this case a header, which is centered. - screen.addComponent( - Components.header() - .withText("Hello, from $GAME_ID v$GAME_VER!") - .withAlignmentWithin(screen, ComponentAlignment.CENTER) - ) - - //Set color theme (will make our own later if we can figure out how - screen.theme = GAME_THEME - //Show the screen - screen.display() + StartView(grid).dock() } \ No newline at end of file