summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/LivingVillage.Desktop/Game.fs11
-rw-r--r--src/LivingVillage.Desktop/TitleScreen.fs2
2 files changed, 7 insertions, 6 deletions
diff --git a/src/LivingVillage.Desktop/Game.fs b/src/LivingVillage.Desktop/Game.fs
index 25b8c48..4720008 100644
--- a/src/LivingVillage.Desktop/Game.fs
+++ b/src/LivingVillage.Desktop/Game.fs
@@ -607,21 +607,22 @@ type LivingVillageGame() as this =
// Menu panel floats over the lower half; translucent so the scene layers stay visible.
spriteBatch.Draw(pixel, Rectangle(panelX, panelY, panelWidth, panelHeight), Color(11, 19, 27, 200))
spriteBatch.Draw(pixel, Rectangle(panelX, panelY, panelWidth, 4), Color(92, 180, 190))
- let contentY = layout.FirstItemY
+ let contentY = panelY + 60
+ let headingY = panelY + 20
match menu.Page with
| MainMenu ->
- drawText innerX (layout.HeadingY) mutedColor (ChineseText.menuHeading MainMenuHeading)
+ drawText innerX headingY mutedColor (ChineseText.menuHeading MainMenuHeading)
MenuState.items menu
|> List.iteri (fun index item -> drawSelection index (MenuState.itemLabel item) (contentY + index * lineHeight))
drawText innerX (panelY + panelHeight - 40) mutedColor "UP DOWN 选择 ENTER 确认"
| Settings ->
- drawText innerX (layout.HeadingY) mutedColor (ChineseText.menuHeading SettingsHeading)
+ drawText innerX headingY mutedColor (ChineseText.menuHeading SettingsHeading)
MenuState.settings
|> List.iteri (fun index setting -> drawSelection index (MenuState.settingsLabel setting) (contentY + index * lineHeight))
drawText innerX (panelY + panelHeight - 72) mutedColor (sprintf "当前 %s" (M6Presentation.clockLabel menu.Settings))
drawText innerX (panelY + panelHeight - 40) mutedColor "ENTER 应用 ESC 返回"
| Controls ->
- drawText innerX (layout.HeadingY) mutedColor (ChineseText.menuHeading ControlsHeading)
+ drawText innerX headingY mutedColor (ChineseText.menuHeading ControlsHeading)
MenuState.controlRows
|> List.iteri (fun index row ->
let keyRect, actionRect = TitleScreen.controlRowRects layout index
@@ -629,7 +630,7 @@ type LivingVillageGame() as this =
PixelText.draw spriteBatch pixel cjkAtlas actionRect.X actionRect.Y textScale textColor row.Action)
drawText innerX (panelY + panelHeight - 40) mutedColor "ESC 返回"
| LoadError ->
- drawText innerX (layout.HeadingY) (Color(240, 130, 120)) "读取失败"
+ drawText innerX headingY (Color(240, 130, 120)) "读取失败"
let message = menu.Error |> Option.defaultValue "暂无存档"
let visible = if message.Length > 24 then message.Substring(0, 24) else message
drawText innerX contentY textColor visible
diff --git a/src/LivingVillage.Desktop/TitleScreen.fs b/src/LivingVillage.Desktop/TitleScreen.fs
index 7ec46d2..c05e472 100644
--- a/src/LivingVillage.Desktop/TitleScreen.fs
+++ b/src/LivingVillage.Desktop/TitleScreen.fs
@@ -51,7 +51,7 @@ module TitleScreen =
/// Key-name and action rectangles for one controls-page row. The key column has a
/// fixed width shared by every row, so all action texts start on the same x.
let controlRowRects (layout: TitleLayout) (rowIndex: int) : TextRect * TextRect =
- let y = layout.FirstItemY + rowIndex * layout.ControlsRowHeight
+ let y = layout.ControlsPanelY + 60 + rowIndex * layout.ControlsRowHeight
{ X = layout.ControlsKeyX; Y = y; Width = layout.ControlsKeyWidth; Height = 16 },
{ X = layout.ControlsActionX; Y = y; Width = layout.PanelX + layout.PanelWidth - layout.ControlsActionX - 24; Height = 16 }