Skip to content

Commit bab01c9

Browse files
committed
Just so I can go back in time
1 parent 26efbce commit bab01c9

File tree

8 files changed

+7
-6
lines changed

8 files changed

+7
-6
lines changed

TODOs/bugs.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
## ✅ Finished
22

3-
- [x] block.script is not filled correctly
3+
- [x] `block.script` is not filled correctly
44
- [x] Keypress event block is marked as not ran too early
55
- [x] Keypress event block should be marked as not ran only when the last block in the script is done
6-
- [x] Use block.top to detect the event which needs to be marked
6+
- [x] Use `block.top` to detect the event which needs to be marked
77
- [x] Wait blocks below key events don't work
88
- [x] Key repeat doesn't apply
9+
- [x] Keys which have ASCII codes don't work
910

1011
## ❎ In progress
1112

12-
- [ ] Keys which have ASCII codes don't work
1313
- [ ] Revisit keypress checks
1414
- [ ] Empty key events set (all keys!)
15-
- [ ] Cannot use multiple event handlers for one key
15+
- [ ] Cannot use multiple event handlers for one key
16+
- [ ] Sprite fencing is wrong

projects/KeyTest1alt3.sb3

-38 Bytes
Binary file not shown.

projects/KeyTest1alt3basic.sb3

41.3 KB
Binary file not shown.

projects/KeyTest1alt3forever.sb3

41.4 KB
Binary file not shown.

projects/KeyTest1alt3long.sb3

41.4 KB
Binary file not shown.

projects/KeyTest1alt3short.sb3

41.4 KB
Binary file not shown.

scratch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ def execute(block, s, keys=set(), keyEvents=set()):
230230

231231
pass
232232

233-
elif KEY_MAPPING[key] in keyEvents and block.next: # when key [. . . v] pressed
233+
elif KEY_MAPPING[key] in keys and block.next: # when key [. . . v] pressed
234234
keyEvents.discard(KEY_MAPPING[key])
235235
if KEY_MAPPING[key] in keys:
236236
if key == "left arrow":

targetSprite.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def setXy(self, x, y):
8686
# Set X and Y
8787
self.x = x + self.padX // 2
8888
self.y = y - self.padY // 2
89-
print(_("debug-prefix"), _("new-sprite-position", x=x, y=y, name=self.name), file=sys.stderr)
89+
# print(_("debug-prefix"), _("new-sprite-position", x=x, y=y, name=self.name), file=sys.stderr)
9090
self.rect.x = self.x + scratch.WIDTH // 2 - round(self.target.costumes[self.target.currentCostume].rotationCenterX)
9191
self.rect.y = scratch.HEIGHT // 2 - self.y - round(self.target.costumes[self.target.currentCostume].rotationCenterY)
9292

0 commit comments

Comments
 (0)