Tweak Values

This commit is contained in:
nelle 2023-10-29 02:54:35 -06:00
parent 8c6526a9c7
commit 09f9728e1d
4 changed files with 58 additions and 3 deletions

View file

@ -22,7 +22,7 @@ object GameConfig {
const val WINDOW_WIDTH = 80
const val WINDOW_HEIGHT = 50
val WORLD_SIZE = Size3D.create(WINDOW_WIDTH * 2, WINDOW_HEIGHT * 2 , DUNGEON_LEVELS)
val WORLD_SIZE = Size3D.create(WINDOW_WIDTH * 3, WINDOW_HEIGHT * 3 , DUNGEON_LEVELS)
val GAME_AREA_SIZE = Size3D.create(
xLength = WINDOW_WIDTH - SIDEBAR_WIDTH,
yLength = WINDOW_HEIGHT - LOG_AREA_HEIGHT,

View file

@ -24,7 +24,7 @@ object GameTileRepository {
//Wall Tile
val WALL: CharacterTile = Tile.newBuilder()
.withCharacter('#')
.withCharacter('')
.withForegroundColor(WALL_FOREGROUND)
.withBackgroundColor(WALL_BACKGROUND)
.buildCharacterTile()

View file

@ -0,0 +1,54 @@
package group.ouroboros.potrogue.view
import group.ouroboros.potrogue.GameConfig
import org.hexworks.zircon.api.ComponentDecorations
import org.hexworks.zircon.api.Components
import org.hexworks.zircon.api.component.ColorTheme
import org.hexworks.zircon.api.component.ComponentAlignment
import org.hexworks.zircon.api.grid.TileGrid
import org.hexworks.zircon.api.view.base.BaseView
class PauseView (private val grid: TileGrid, theme: ColorTheme = GameConfig.THEME) : BaseView(grid, theme) {
init {
val msg = "Pre-Game Configuration"
// a text box can hold headers, paragraphs and list items
// `contentWidth = ` here is a so-called keyword parameter
// using them you can pass parameters not by their order
// but by their name.
// this might be familiar for Python programmers
val header = Components.textBox(contentWidth = msg.length)
// we add a header
.addHeader(msg)
// and a new line
.addNewLine()
// and align it to center
.withAlignmentWithin(screen, ComponentAlignment.TOP_CENTER)
.build() // finally we build the component
val backButton = Components.button()
.withAlignmentWithin(screen, ComponentAlignment.BOTTOM_CENTER)
.withText("RESUME")
.withDecorations(ComponentDecorations.box(), ComponentDecorations.shadow())
.build()
val resumeButton = Components.button()
.withAlignmentWithin(screen, ComponentAlignment.BOTTOM_CENTER)
.withText("RESUME")
.withDecorations(ComponentDecorations.box(), ComponentDecorations.shadow())
.build()
//Once the back button is activated go back to startView
backButton.onActivated {
replaceWith(StartView(grid))
}
resumeButton.onActivated {
replaceWith(PlayView(grid))
}
// We can add multiple components at once
//Bake The Cake
screen.addComponents(header,backButton)
}
}

View file

@ -25,7 +25,8 @@ class World (
) : GameArea<Tile, GameBlock> by GameAreaBuilder.newBuilder<Tile, GameBlock>()
// We set its visibleSize. This is the size of the area which will be visible on our screen
.withVisibleSize(visibleSize)
// We set the actualSize. This is the size of the whole world which can be multiple times bigger than the visible part. GameArea supports scrolling so well be able to scroll through our caves soon
// We set the actualSize. This is the size of the whole world which can be multiple times bigger than the visible part.
// GameArea supports scrolling so well be able to scroll through our caves soon
.withActualSize(actualSize)
.build() {