diff options
| author | Somhairle H. Marisol <[email protected]> | 2026-09-20 15:14:23 +0800 |
|---|---|---|
| committer | Somhairle H. Marisol <[email protected]> | 2026-09-20 15:14:23 +0800 |
| commit | 9724663602b4b1eb755bf334c475dc2c80e4b386 (patch) | |
| tree | 681bfcc9f7bb6422ed80142702cfff1498f064b1 /src/LivingVillage.Desktop/M6Presentation.fs | |
| parent | 7e197babfbb68d7f7d1866d6a0ca47cf17d3af23 (diff) | |
| download | living-village-9724663602b4b1eb755bf334c475dc2c80e4b386.tar.gz | |
feat(m6a): add save speed and day-night controls
Diffstat (limited to 'src/LivingVillage.Desktop/M6Presentation.fs')
| -rw-r--r-- | src/LivingVillage.Desktop/M6Presentation.fs | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/LivingVillage.Desktop/M6Presentation.fs b/src/LivingVillage.Desktop/M6Presentation.fs new file mode 100644 index 0000000..410f20a --- /dev/null +++ b/src/LivingVillage.Desktop/M6Presentation.fs @@ -0,0 +1,35 @@ +namespace LivingVillage.Desktop + +open Microsoft.Xna.Framework +open LivingVillage.Kernel +open LivingVillage.Kernel.Sim + +type M6DayNight = + | Day + | Night + +type M6RenderProfile = + { Mode: M6DayNight + Background: Color + WorldTint: Color } + +module M6Presentation = + + let profileAtTick (tick: int64) : M6RenderProfile = + if Sim.isNightTick tick then + { Mode = Night + Background = Color(18, 25, 55) + WorldTint = Color(118, 136, 184) } + else + { Mode = Day + Background = Color(100, 160, 210) + WorldTint = Color.White } + + let clockLabel (control: SimulationControl) : string = + if control.Paused then + "PAUSED" + else + match control.Speed with + | OneX -> "1X" + | TwoX -> "2X" + | FiveX -> "5X" |
