Color theme variable

This commit is contained in:
nelle 2023-10-28 13:43:04 -06:00
parent 36275cf1e9
commit 453b77adc7
2 changed files with 6 additions and 3 deletions

View file

@ -2,6 +2,7 @@ package group.ouroboros.potrogue
import org.hexworks.zircon.api.ColorThemes
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
@ -11,6 +12,7 @@ import org.hexworks.zircon.api.screen.Screen
//Important Values
public val GAME_ID = "potrogue";
public val GAME_VER = "0.1.0-DEV";
public val GAME_THEME = cyberpunk()
fun main(args: Array<String>) {
@ -25,7 +27,7 @@ fun main(args: Array<String>) {
//TODO
//Create Custom Color Theme
/*
val potCol = ColorThemeBuilder.newBuilder()
val GAME_THEME = ColorThemeBuilder.newBuilder()
.withName("potcolor")
.withAccentColor(TileColor.transparent())
.withPrimaryForegroundColor(TileColor.transparent())
@ -43,7 +45,7 @@ fun main(args: Array<String>) {
)
//Set color theme (will make our own later if we can figure out how
screen.theme = ColorThemes.cyberpunk()
screen.theme = GAME_THEME
//Show the screen
screen.display()
}

View file

@ -1,6 +1,7 @@
package group.ouroboros.potrogue.view
import group.ouroboros.potrogue.GAME_ID
import group.ouroboros.potrogue.GAME_THEME
import org.hexworks.zircon.api.ColorThemes
import org.hexworks.zircon.api.ComponentDecorations.box
import org.hexworks.zircon.api.ComponentDecorations.shadow
@ -9,7 +10,7 @@ import org.hexworks.zircon.api.component.ComponentAlignment
import org.hexworks.zircon.api.grid.TileGrid
import org.hexworks.zircon.api.view.base.BaseView
class StartView (private val grid: TileGrid) : BaseView(grid, ColorThemes.arc()) {
class StartView (private val grid: TileGrid) : BaseView(grid, GAME_THEME) {
init {
val msg = "Welcome to $GAME_ID."