Working view and tileset

This commit is contained in:
nelle 2023-10-28 13:47:08 -06:00
parent 453b77adc7
commit 7e9eb21f83

View file

@ -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<String>) {
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<String>) {
.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()
}