add load functionality (but note that saving is still hardcoded right now)

This commit is contained in:
2024-09-29 22:26:07 +01:00
parent 249247b704
commit 13682f1c6c
5 changed files with 53 additions and 21 deletions

View File

@@ -58,7 +58,8 @@ sig
* int
-> AppType.app_type
val useTriangles: AppType.app_type * AppType.triangle list -> AppType.app_type
val useTrianglesAndSetNormalMode: AppType.app_type * AppType.triangle list
-> AppType.app_type
end
structure AppWith :> APP_WITH =
@@ -559,10 +560,10 @@ struct
}
end
fun useTriangles (app: app_type, triangles) =
fun useTrianglesAndSetNormalMode (app: app_type, triangles) =
let
val
{ mode
{ mode = _
, xClickPoints
, yClickPoints
, numClickPoints
@@ -584,7 +585,7 @@ struct
val triangleStage = NO_TRIANGLE
in
{ mode = mode
{ mode = AppType.NORMAL_MODE
, triangleStage = triangleStage
, triangles = triangles
, undo = []