Consolodated config, added portals, etc.

This commit is contained in:
2025-11-24 15:03:56 -07:00
parent f39684873b
commit 57d08f2f04
15 changed files with 895 additions and 212 deletions

View File

@@ -6,7 +6,6 @@ import (
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/inpututil"
"github.com/hajimehoshi/ebiten/v2/text/v2"
"github.com/hajimehoshi/ebiten/v2/vector"
)
// Menu options
@@ -52,6 +51,10 @@ func (t *TitleScreen) SetFPSCap(cap FPSCapSetting) {
t.settingsScreen.SetFPSCap(cap)
}
func (t *TitleScreen) SetPortalVisibility(enabled *bool) {
t.settingsScreen.SetPortalVisibility(enabled)
}
func (t *TitleScreen) SetHasSaveGame(hasSave bool) {
t.hasSaveGame = hasSave
if !hasSave && t.selectedIndex == 0 {
@@ -151,15 +154,6 @@ func (t *TitleScreen) Draw(screen *ebiten.Image, screenWidth, screenHeight int)
indicatorX := optionX - 20
t.drawText(screen, ">", color.RGBA{R: 255, G: 200, B: 0, A: 255}, indicatorX, optionY)
t.drawText(screen, option, color.RGBA{R: 255, G: 255, B: 100, A: 255}, optionX, optionY)
boxPadding := float32(10.0)
boxWidth := float32(len(option)*7) + boxPadding*2
boxHeight := float32(20)
boxX := float32(optionX) - boxPadding
boxY := float32(optionY) - float32(basicFaceAscent) - boxPadding/2
vector.StrokeRect(screen, boxX, boxY, boxWidth, boxHeight, 2,
color.RGBA{R: 255, G: 200, B: 0, A: 255}, false)
} else {
t.drawText(screen, option, optionColor, optionX, optionY)
}