I am tying to have a load of functions where by when i call each function on the screen function, it displays stuff i want on the screen. Im having trouble with this simple program. I would like to display text on the screen when i write to it. but all its doing is displaying the screen.
import pygame
from pygame.locals import *
pygame.init()
def screen(width,height,name):
screen = pygame.display.set_mode((600,600))
screen=pygame.display.set_mode((width,height))
return screen
def name(name=""):
pygame.font.init()
myfont = pygame.font.SysFont("monospace", 15)
label = myfont.render("Some text!", 1, (255,255,0))
result=screen(640,480,name).blit(label, (100, 100))
return result
screen(640,480,name("donkey from shrek"))