MCPcopy Index your code
hub / github.com/ndleah/python-mini-project / drawText

Function drawText

Chess_Game/ChessGame.py:148–154  ·  view source on GitHub ↗
(screen, text)

Source from the content-addressed store, hash-verified

146 clock.tick(60)
147
148def drawText(screen, text):
149 font = p.font.SysFont("Helvitca", 32, True, False)
150 textObject = font.render(text, True, p.Color('Gray'))
151 textLocation = p.Rect(0, 0, WIDTH, HEIGHT).move(WIDTH/2 - textObject.get_width()/2, HEIGHT/2 - textObject.get_height()/2)
152 screen.blit(textObject, textLocation)
153 textObject = font.render(text, True, p.Color("Black"))
154 screen.blit(textObject, textLocation.move(2,2))
155
156
157if __name__ == "__main__":

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected