summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/LivingVillage.Desktop/Game.fs18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/LivingVillage.Desktop/Game.fs b/src/LivingVillage.Desktop/Game.fs
index 9e229aa..c8d0044 100644
--- a/src/LivingVillage.Desktop/Game.fs
+++ b/src/LivingVillage.Desktop/Game.fs
@@ -141,6 +141,7 @@ type LivingVillageGame() as this =
let mutable menu = MenuState.create startSimulationControl false
let mutable autoplayFrames = 0
let mutable flowStep = 0
+ let mutable flowHold = 0
let mutable sampleState = SampleScript.initial
let mutable hudClock = 0L
let mutable hudStatus = ""
@@ -381,7 +382,15 @@ type LivingVillageGame() as this =
match flowStep with
| 0 ->
printfn "flow=main-menu"
- this.DispatchMenuInput Confirm
+ flowStep <- 50
+ | 50 when menu.Page = MainMenu ->
+ flowHold <- flowHold + 1
+ if flowHold >= 60 then
+ flowHold <- 0
+ this.DispatchMenuInput Confirm
+ printfn "flow=new-game"
+ flowStep <- 1
+ | 50 ->
printfn "flow=new-game"
flowStep <- 1
| 1 when menu.Page = Playing ->
@@ -401,6 +410,13 @@ type LivingVillageGame() as this =
moveDown 4
this.DispatchMenuInput Confirm
printfn "flow=controls=open"
+ flowStep <- 30
+ | 30 ->
+ flowHold <- flowHold + 1
+ if flowHold >= 60 || menu.Page <> Controls then
+ flowHold <- 0
+ flowStep <- 31
+ | 31 ->
this.DispatchMenuInput Back
printfn "flow=controls=back"
flowStep <- 4