add caption to KSR images (deja vu)

This commit is contained in:
2022-12-08 18:35:18 +00:00
parent e24c79776c
commit 8e916ea92d

View File

@@ -54,11 +54,11 @@
show (noConfirmShow.bind text)
score (typeScore.bind text)))
(function :CardSide image [:String path]
(function :CardSide image [:String path &opt :String caption]
(object
show ->:Void [engine cc] (engine.showImageCC path cc)
show ->:Void [engine cc] {(when caption (engine.print caption)) (engine.showImageCC path cc)}
score ->:Void [engine :Int->Void resolve] {(engine.showImage path)(engine.print "Score (0-5): ")(engine.input ->:Void str (resolve (Std.parseInt str)))}))
score ->:Void [engine :Int->Void resolve] {(when caption (engine.print caption))(engine.showImage path)(engine.print "Score (0-5): ")(engine.input ->:Void str (resolve (Std.parseInt str)))}))
(defMacroVar cardId 0)
(defMacroVar groupId 0)