Signed-off-by: LimePotato <bm01@limepot.xyz>
This commit is contained in:
nelle 2023-10-28 15:25:49 -06:00
parent 38ee3af180
commit 07fd967bde
2 changed files with 15 additions and 3 deletions

View file

@ -5,8 +5,8 @@ import group.ouroboros.potrogue.view.StartView
import org.hexworks.zircon.api.SwingApplications
//Important Values
public val GAME_ID = "potrogue";
public val GAME_VER = "0.1.0-DEV";
const val GAME_ID = "potrogue";
const val GAME_VER = "0.1.0-DEV";
fun main(args: Array<String>) {
val grid = SwingApplications.startTileGrid(GameConfig.buildAppConfig())

View file

@ -1,20 +1,32 @@
package group.ouroboros.potrogue.view
import group.ouroboros.potrogue.GameConfig
import group.ouroboros.potrogue.GameConfig.LOG_AREA_HEIGHT
import group.ouroboros.potrogue.GameConfig.SIDEBAR_WIDTH
import group.ouroboros.potrogue.GameConfig.WINDOW_WIDTH
import org.hexworks.zircon.api.ComponentDecorations.box
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 PlayView (private val grid: TileGrid, theme: ColorTheme = GameConfig.THEME) : BaseView(grid, theme) {
init {
//Create Sidebar
val sidebar = Components.panel()
.withSize(GameConfig.SIDEBAR_WIDTH, GameConfig.WINDOW_HEIGHT)
.withDecorations(box())
.build()
screen.addComponent(sidebar)
//Create area for logging
val logArea = Components.logArea()
.withDecorations(box(title = "Log")) // 1
.withSize(WINDOW_WIDTH - SIDEBAR_WIDTH, LOG_AREA_HEIGHT)
.withAlignmentWithin(screen, ComponentAlignment.BOTTOM_RIGHT) // 2
.build()
screen.addComponents(sidebar, logArea)
}
}