Working view and tileset
This commit is contained in:
parent
453b77adc7
commit
7e9eb21f83
1 changed files with 4 additions and 14 deletions
|
@ -1,12 +1,11 @@
|
||||||
package group.ouroboros.potrogue
|
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.ColorThemes.cyberpunk
|
||||||
import org.hexworks.zircon.api.Components
|
|
||||||
import org.hexworks.zircon.api.SwingApplications
|
import org.hexworks.zircon.api.SwingApplications
|
||||||
import org.hexworks.zircon.api.application.AppConfig
|
import org.hexworks.zircon.api.application.AppConfig
|
||||||
import org.hexworks.zircon.api.component.ComponentAlignment
|
|
||||||
import org.hexworks.zircon.api.screen.Screen
|
import org.hexworks.zircon.api.screen.Screen
|
||||||
|
|
||||||
//Important Values
|
//Important Values
|
||||||
|
@ -20,6 +19,7 @@ fun main(args: Array<String>) {
|
||||||
val grid = SwingApplications.startTileGrid(
|
val grid = SwingApplications.startTileGrid(
|
||||||
AppConfig.newBuilder()
|
AppConfig.newBuilder()
|
||||||
.withTitle("$GAME_ID | $GAME_VER")
|
.withTitle("$GAME_ID | $GAME_VER")
|
||||||
|
.withDefaultTileset(CP437TilesetResources.rogueYun16x16())
|
||||||
.build()
|
.build()
|
||||||
)
|
)
|
||||||
val screen = Screen.create(grid)
|
val screen = Screen.create(grid)
|
||||||
|
@ -37,15 +37,5 @@ fun main(args: Array<String>) {
|
||||||
.build())
|
.build())
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//Add a component to the screen, in this case a header, which is centered.
|
StartView(grid).dock()
|
||||||
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()
|
|
||||||
}
|
}
|
Loading…
Reference in a new issue