MCPcopy Create free account
hub / github.com/ActiveState/code / text_objects

Function text_objects

recipes/Python/578996_Snake_the_game/recipe-578996.py:120–128  ·  view source on GitHub ↗
(text,color,size)

Source from the content-addressed store, hash-verified

118 pygame.draw.rect(gameDisplay, green, (XnY[0],XnY[1],block_size,block_size))
119
120def text_objects(text,color,size):
121
122 if size=="small":
123 textSurface=smallfont.render(text,True,color)
124 elif size=="medium":
125 textSurface=medfont.render(text,True,color)
126 elif size=="large":
127 textSurface=largefont.render(text,True,color)
128 return textSurface,textSurface.get_rect()
129
130def message_to_screen(msg,color,y_displace=0,size="small"):
131

Callers 1

message_to_screenFunction · 0.85

Calls 1

renderMethod · 0.45

Tested by

no test coverage detected