done implementing load-squares functionality
This commit is contained in:
@@ -1011,7 +1011,65 @@ struct
|
||||
}
|
||||
end
|
||||
|
||||
(* todo:
|
||||
fun useSquaresAndSetNormalMode (app: app_type, squares, canvasWidth, canvasHeight) =
|
||||
*)
|
||||
fun useSquares (app: app_type, squares, canvasWidth, canvasHeight) =
|
||||
let
|
||||
val
|
||||
{ mode
|
||||
, canvasHeight = _
|
||||
, canvasWidth = _
|
||||
, squares = _
|
||||
, arrowX
|
||||
, arrowY
|
||||
, windowWidth
|
||||
, windowHeight
|
||||
, xClickPoints
|
||||
, yClickPoints
|
||||
|
||||
, showGraph
|
||||
, mouseX
|
||||
, mouseY
|
||||
, openFilePath
|
||||
, fileBrowser
|
||||
, fileBrowserIdx
|
||||
, r
|
||||
, g
|
||||
, b
|
||||
, a
|
||||
, modalNum
|
||||
, undo
|
||||
, redo
|
||||
} = app
|
||||
|
||||
val arrowX = Int.min (arrowX, canvasWidth)
|
||||
val arrowY = Int.min (arrowY, canvasHeight)
|
||||
val (xClickPoints, yClickPoints) =
|
||||
ClickPoints.generate
|
||||
(windowWidth, windowHeight, canvasWidth, canvasHeight)
|
||||
in
|
||||
{ mode = mode
|
||||
, canvasHeight = canvasHeight
|
||||
, canvasWidth = canvasWidth
|
||||
, arrowX = arrowX
|
||||
, mouseX = mouseX
|
||||
, mouseY = mouseY
|
||||
, squares = squares
|
||||
, arrowY = arrowY
|
||||
, windowWidth = windowWidth
|
||||
, windowHeight = windowHeight
|
||||
, xClickPoints = xClickPoints
|
||||
, yClickPoints = yClickPoints
|
||||
|
||||
, showGraph = showGraph
|
||||
, openFilePath = openFilePath
|
||||
, fileBrowser = fileBrowser
|
||||
, fileBrowserIdx = fileBrowserIdx
|
||||
, r = r
|
||||
, g = g
|
||||
, b = b
|
||||
, a = a
|
||||
, modalNum = 0
|
||||
, undo = undo
|
||||
, redo = redo
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user