Handbook
Glossary
check-demo-window ( window -- )
Vocabulary
demos
.
smoke-test
Inputs
window
an
object
Outputs
None
Definition
USING:
accessors
bunny
calendar
circular
game.loop
game.worlds
gpu.util.wasd
kernel
math
sequences
system
terrain
terrain.smoke-test
threads
timers
trails
ui
;
IN:
demos.smoke-test
::
check-demo-window
( window -- )
window
raise-window
200
milliseconds
sleep
os
macos?
window
grab-input?>>
and
[
window
handle>>
input-grabbed?>>
t
assert=
]
when
window
game-world?
[
window
game-loop>>
tick#>>
0
>
t
assert=
window
game-loop>>
stop-loop
]
when
os
macos?
[
window
wasd-world?
[
window
check-native-wasd
]
when
window
terrain-world?
[
window
check-cocoa-controls
]
when
]
when
window
children>>
?first
dup
trails-gadget?
[
dup
timer>>
stop-timer
points>>
{
200 200
}
swap
circular-push
]
[
drop
]
if
window
bunny-world?
[
window
draw-seq>>
length
[|
n | window n
>>draw-n
demo-frame
drop
]
each-integer
]
when
window
demo-frame
drop
window
{
640 400
}
resize-window
300
milliseconds
sleep
window
demo-frame
drop
;