MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / render_message

Function render_message

examples/space_invaders/space_invaders.py:502–524  ·  view source on GitHub ↗

Render a message glyph. Clears the area beneath the message first and assumes the display will be paused afterwards.

(session, window, msg, x, y)

Source from the content-addressed store, hash-verified

500
501
502def render_message(session, window, msg, x, y):
503 """Render a message glyph.
504
505 Clears the area beneath the message first
506 and assumes the display will be paused
507 afterwards.
508
509 """
510 # create message box
511 msg = GlyphCoordinate(session, msg, x, y)
512
513 # clear existing glyphs which intersect
514 for gly in (
515 session.query(GlyphCoordinate)
516 .join(GlyphCoordinate.glyph)
517 .filter(GlyphCoordinate.intersects(msg))
518 ):
519 gly.blank(window)
520
521 # render
522 msg.render(window, {})
523 window.refresh()
524 return msg
525
526
527def win(session, window, state):

Callers 4

winFunction · 0.85
loseFunction · 0.85
pauseFunction · 0.85
startFunction · 0.85

Calls 8

renderMethod · 0.95
GlyphCoordinateClass · 0.85
blankMethod · 0.80
filterMethod · 0.45
joinMethod · 0.45
queryMethod · 0.45
intersectsMethod · 0.45
refreshMethod · 0.45

Tested by

no test coverage detected