begin drawing file browser text
This commit is contained in:
@@ -26,8 +26,9 @@ struct
|
||||
val _ =
|
||||
AppDraw.drawTriangles (triangleDrawObject, triangleDrawLength)
|
||||
val _ = AppDraw.drawDot (dotDrawObject, dotDrawLength)
|
||||
val _ = AppDraw.drawModalText (modalTextDrawObject, modalTextDrawLength)
|
||||
|
||||
val _ =
|
||||
AppDraw.drawModalText (modalTextDrawObject, modalTextDrawLength)
|
||||
|
||||
val _ = Glfw.swapBuffers window
|
||||
val _ = Glfw.pollEvents ()
|
||||
in
|
||||
@@ -167,6 +168,24 @@ struct
|
||||
, modalTextDrawObject
|
||||
, modalTextDrawLength
|
||||
)
|
||||
end
|
||||
| DRAW_MODAL_TEXT vec =>
|
||||
let
|
||||
val _ = AppDraw.uploadModalText (modalTextDrawObject, vec)
|
||||
val modalTextDrawLength = Vector.length vec div 5
|
||||
in
|
||||
run
|
||||
( drawMailbox
|
||||
, window
|
||||
, graphDrawObject
|
||||
, drawGraphLength
|
||||
, dotDrawObject
|
||||
, dotDrawLength
|
||||
, triangleDrawObject
|
||||
, triangleDrawLength
|
||||
, modalTextDrawObject
|
||||
, modalTextDrawLength
|
||||
)
|
||||
end)
|
||||
else
|
||||
Glfw.terminate ()
|
||||
|
||||
@@ -172,11 +172,11 @@ struct
|
||||
case OS.FileSys.readDir dir of
|
||||
SOME path =>
|
||||
if OS.FileSys.isDir path then
|
||||
getDirList (dir, AppType.FOLDER path :: acc)
|
||||
getDirList (dir, AppType.IS_FOLDER path :: acc)
|
||||
else if OS.FileSys.isLink path then
|
||||
getDirList (dir, acc)
|
||||
else
|
||||
getDirList (dir, AppType.FILE path :: acc)
|
||||
getDirList (dir, AppType.IS_FILE path :: acc)
|
||||
| NONE => let val acc = List.rev acc in Vector.fromList acc end
|
||||
|
||||
fun loadFiles (path, inputMailbox) =
|
||||
@@ -185,8 +185,9 @@ struct
|
||||
val dir = OS.FileSys.openDir path
|
||||
val dirList = getDirList (dir, [])
|
||||
val _ = OS.FileSys.closeDir dir
|
||||
val inputMsg = FILE_BROWSER_AND_PATH {fileBrowser = dirList, path = path}
|
||||
in
|
||||
()
|
||||
Mailbox.send (inputMailbox, inputMsg)
|
||||
end
|
||||
|
||||
fun run (fileMailbox, inputMailbox) =
|
||||
|
||||
Reference in New Issue
Block a user