File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,4 +74,8 @@ namespace microcode {
7474 if ( theInterpreter ) theInterpreter . stop ( )
7575 theInterpreter = undefined
7676 }
77+
78+ export function isProgramRunning ( ) {
79+ return theInterpreter != undefined
80+ }
7781}
Original file line number Diff line number Diff line change @@ -2921,6 +2921,25 @@ bffffffffffffffffffffffffffffffb
29212921 . . . . . . . . . . . . . . . .
29222922 `
29232923
2924+ export const running = bmp `
2925+ . . . . . . . . . . . . . . . .
2926+ . . . . . . . . . . . . . . . .
2927+ . c c c . . . . . . . . . . . .
2928+ . c 5 5 c c . . . . . . . . . .
2929+ . c 5 5 5 5 c c c . . . . . . .
2930+ . c 5 5 5 5 5 5 c c . . . . . .
2931+ . c 5 5 5 5 5 5 5 5 c c . . . .
2932+ . c 5 5 5 5 5 5 5 5 5 5 c c . .
2933+ . c 5 5 5 5 5 5 5 5 5 5 5 5 c .
2934+ . c 5 5 5 5 5 5 5 5 5 5 c c . .
2935+ . c 5 5 5 5 5 5 5 5 c c . . . .
2936+ . c 5 5 5 5 5 5 c c . . . . . .
2937+ . c 5 5 5 5 c c . . . . . . . .
2938+ . c 5 5 c c . . . . . . . . . .
2939+ . c c c . . . . . . . . . . . .
2940+ . . . . . . . . . . . . . . . .
2941+ `
2942+
29242943 export const car = bmp `
29252944 . . . . . . . . . . . . . . . .
29262945 . . . . . . . . . . . . . . . .
Original file line number Diff line number Diff line change @@ -267,7 +267,11 @@ namespace microcode {
267267 x : Screen . LEFT_EDGE + 32 ,
268268 y : 8 ,
269269 onClick : ( ) => {
270- runProgram ( this . progdef )
270+ if ( ! isProgramRunning ( ) ) {
271+ runProgram ( this . progdef )
272+ this . runBtn . buildSprite ( icondb . running )
273+ this . dirty = true
274+ }
271275 } ,
272276 } )
273277 this . stopBtn = new Button ( {
@@ -278,7 +282,14 @@ namespace microcode {
278282 x : Screen . LEFT_EDGE + 52 ,
279283 y : 8 ,
280284 onClick : ( ) => {
281- stopProgram ( )
285+ if ( isProgramRunning ( ) ) {
286+ stopProgram ( )
287+ this . runBtn . buildSprite ( icondb . run )
288+ this . dirty = true
289+ basic . showIcon ( IconNames . No )
290+ control . waitMicros ( 200000 )
291+ basic . clearScreen ( )
292+ }
282293 } ,
283294 } )
284295 this . pageBtn = new Button ( {
You can’t perform that action at this time.
0 commit comments