From 453b77adc7ed942a171f8d49c33d128629b85c2a Mon Sep 17 00:00:00 2001 From: LimePotato Date: Sat, 28 Oct 2023 13:43:04 -0600 Subject: [PATCH] Color theme variable --- src/main/kotlin/group/ouroboros/potrogue/main.kt | 6 ++++-- src/main/kotlin/group/ouroboros/potrogue/view/StartView.kt | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/group/ouroboros/potrogue/main.kt b/src/main/kotlin/group/ouroboros/potrogue/main.kt index dc251d0..b2b2abd 100644 --- a/src/main/kotlin/group/ouroboros/potrogue/main.kt +++ b/src/main/kotlin/group/ouroboros/potrogue/main.kt @@ -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) { @@ -25,7 +27,7 @@ fun main(args: Array) { //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) { ) //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() } \ No newline at end of file diff --git a/src/main/kotlin/group/ouroboros/potrogue/view/StartView.kt b/src/main/kotlin/group/ouroboros/potrogue/view/StartView.kt index 21ceea0..ab035b7 100644 --- a/src/main/kotlin/group/ouroboros/potrogue/view/StartView.kt +++ b/src/main/kotlin/group/ouroboros/potrogue/view/StartView.kt @@ -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."