summaryrefslogtreecommitdiff
path: root/src/LivingVillage.Desktop/HudLayout.fs
diff options
context:
space:
mode:
Diffstat (limited to 'src/LivingVillage.Desktop/HudLayout.fs')
-rw-r--r--src/LivingVillage.Desktop/HudLayout.fs25
1 files changed, 18 insertions, 7 deletions
diff --git a/src/LivingVillage.Desktop/HudLayout.fs b/src/LivingVillage.Desktop/HudLayout.fs
index b19df4b..cd06224 100644
--- a/src/LivingVillage.Desktop/HudLayout.fs
+++ b/src/LivingVillage.Desktop/HudLayout.fs
@@ -122,6 +122,17 @@ module HudLayout =
let y = (barHeight - height) / 2
Microsoft.Xna.Framework.Rectangle(x - 6, y, width + 12, height)
+ /// P75:药丸底部 1px 强调发丝线(取代整条铺满的 accent 带,让留白更足)。
+ let pillHairline (x: int) (width: int) : Microsoft.Xna.Framework.Rectangle =
+ let pill = segmentBackdrop x width
+ Microsoft.Xna.Framework.Rectangle(pill.X + 1, pill.Y + pill.Height - 2, max 1 (pill.Width - 2), 1)
+
+ /// P75:顶部不再铺整宽深色带(0 = 仅靠半透明药丸承载信息,去掉「整块深色底」)。
+ let bandAlpha : byte = 0uy
+
+ /// P75:药丸高度的紧凑上界(须 < barHeight 以留出上下留白)。
+ let pillHeight : int = 8 * textScale + 10
+
type Palette =
{ BarTop: Color
BarBottom: Color
@@ -131,25 +142,25 @@ module HudLayout =
SegmentBackdrop: Color
Outline: Color }
- /// 白天暖色 / 夜晚(冬夜)冷色微调;均为半透明渐变窄条,无大黑块。
- /// 每个常驻片段再叠一层半透明底色 + 1px 深色描边,双时段都能读清。
+ /// 白天暖色 / 夜晚(冬夜)冷色微调;半透明药丸承载信息,无整宽深色带、无大黑块。
+ /// P75 起 `BarTop/BarBottom` 保留字段但 alpha=0(不再铺整条底色)。
let palette (mode: M6DayNight) : Palette =
match mode with
| Day ->
- { BarTop = Color(40, 56, 62, 200)
- BarBottom = Color(22, 34, 40, 200)
+ { BarTop = Color(40, 56, 62, 0)
+ BarBottom = Color(22, 34, 40, 0)
Accent = Color(212, 168, 96)
Label = Color(206, 220, 208)
Value = Color(242, 248, 234)
SegmentBackdrop = Color(8, 14, 20, 150)
Outline = Color(6, 10, 14, 255) }
| Night ->
- { BarTop = Color(22, 30, 48, 205)
- BarBottom = Color(13, 19, 33, 205)
+ { BarTop = Color(22, 30, 48, 0)
+ BarBottom = Color(13, 19, 33, 0)
Accent = Color(120, 168, 196)
Label = Color(176, 196, 214)
Value = Color(228, 238, 246)
- SegmentBackdrop = Color(4, 8, 16, 160)
+ SegmentBackdrop = Color(4, 8, 16, 170)
Outline = Color(3, 6, 12, 255) }
// ---- P43:右上日历钟卡(纯模型;季节/天数/时段/时钟全部由真实 tick 导出)----