draw-hint ( gadget -- )


Vocabulary
minesweeper

Inputs and outputs
gadgetan object


Definition


:: draw-hint ( gadget -- )
gadget hint?>> "xyzzy" sequence= [
gadget hand-rel first2 :> ( w h ) h 58 >= [
h 58 - w [ 32 /i ] bi@
:> ( row col ) gadget cells>> row col cell-at [
mined?>> T{ rgba
{ red 0.0 }
{ green 0.0 }
{ blue 0.0 }
{ alpha 1.0 }
} T{ rgba
{ red 1.0 }
{ green 1.0 }
{ blue 1.0 }
{ alpha 1.0 }
} ? gl-color { 0 0 } { 1 1 } gl-fill-rect
] when*
] when
] when ;