Skip to content

Commit 807fdca

Browse files
committed
Explain non-blocking event loops in the getting started example.
1 parent 934d2dd commit 807fdca

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/tcod/getting-started.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ Example::
4545
console.print(x=0, y=0, string="Hello World!")
4646
context.present(console) # Show the console.
4747

48+
# This event loop will wait until at least one event is processed before exiting.
49+
# For a non-blocking event loop replace `tcod.event.wait` with `tcod.event.get`.
4850
for event in tcod.event.wait():
4951
context.convert_event(event) # Sets tile coordinates for mouse events.
5052
print(event) # Print event names and attributes.

0 commit comments

Comments
 (0)