File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,17 @@ on the page.
4040A config attribute can be specified to add extra packages but right now that's
4141all it can do.
4242
43+ !!! Info
44+
45+ Sometimes you need to gather text based user input when starting a game.
46+ The usual way to do this is via the builtin `input` function.
47+
48+ Because PyGame-CE **only runs on the main thread**, the only way to block
49+ your code while it waits for user `input` is to use a
50+ [JavaScript prompt](https://developer.mozilla.org/en-US/docs/Web/API/Window/prompt)
51+ instead of input typed in via a terminal. PyScript handles this
52+ automatically for you if you use the `input` function.
53+
4354This is an experiment, but:
4455
4556* It is possible to use regular PyScript to load the pygame-ce package and use
You can’t perform that action at this time.
0 commit comments