minesweeper: fix bug when running before ever clicking on anything.
parent
ca3b44b39b
commit
0d878f2873
|
@ -182,8 +182,7 @@ M: grid-gadget pref-dim*
|
||||||
gadget pref-dim first :> width
|
gadget pref-dim first :> width
|
||||||
width 2/ 26 - 3 2array [
|
width 2/ 26 - 3 2array [
|
||||||
gadget cells>> [ won? ] [ lost? ] bi
|
gadget cells>> [ won? ] [ lost? ] bi
|
||||||
hand-buttons get-global empty? not
|
gadget hand-click-rel [ second 58 >= ] [ f ] if*
|
||||||
gadget hand-click-rel second 58 >= and
|
|
||||||
smiley-image-path gadget draw-cached-texture
|
smiley-image-path gadget draw-cached-texture
|
||||||
] with-translation ;
|
] with-translation ;
|
||||||
|
|
||||||
|
@ -284,7 +283,7 @@ TUPLE: minesweeper-gadget < track ;
|
||||||
[ <toolbar> format-toolbar f track-add ]
|
[ <toolbar> format-toolbar f track-add ]
|
||||||
[ 1 track-add ] bi ;
|
[ 1 track-add ] bi ;
|
||||||
|
|
||||||
M: minesweeper-gadget focusable-child* children>> ?second t or ;
|
M: minesweeper-gadget focusable-child* children>> second ;
|
||||||
|
|
||||||
MAIN-WINDOW: run-minesweeper {
|
MAIN-WINDOW: run-minesweeper {
|
||||||
{ title "Minesweeper" }
|
{ title "Minesweeper" }
|
||||||
|
|
Loading…
Reference in New Issue