SOme changes on Labelclass
This commit is contained in:
@@ -72,6 +72,7 @@ def percent_from_screen(base:int, percent:int) -> int:
|
||||
|
||||
game = Game.Game()
|
||||
User = User.User()
|
||||
input_label = Label.Label(True, (50,50), (100,25), PLAYGROUND)
|
||||
|
||||
|
||||
|
||||
@@ -106,10 +107,11 @@ spawn_fruit = True
|
||||
game_started = False
|
||||
text = ""
|
||||
|
||||
game.change_state("started")
|
||||
game.change_state("menu")
|
||||
|
||||
while active == True:
|
||||
MAINSCREEN.fill((55,148,38))
|
||||
PLAYGROUND.fill((244,244,244))
|
||||
for event in pygame.event.get():
|
||||
if (event.type == pygame.QUIT):
|
||||
print("Programm wird geschlossen!")
|
||||
@@ -135,6 +137,7 @@ while active == True:
|
||||
player.change_direction("left")
|
||||
|
||||
if(game.get_state("menu")):
|
||||
pass
|
||||
if(event.type == pygame.KEYDOWN):
|
||||
print(event.unicode)
|
||||
text += event.unicode
|
||||
@@ -145,11 +148,10 @@ while active == True:
|
||||
|
||||
text_out = my_font.render(text, True, SCHWARZ, None)
|
||||
|
||||
|
||||
|
||||
input_label.draw()
|
||||
pygame.draw.line(MAINSCREEN, SCHWARZ, (0,38), (MAINSCREEN_SIZE[0], 38), 2)
|
||||
|
||||
PLAYGROUND.fill((244,244,244))
|
||||
|
||||
PLAYGROUND.blit(text_out, (MAINSCREEN_SIZE[0]/2, MAINSCREEN_SIZE[1]/2))
|
||||
#pygame.draw.rect(surface_menu, (0,0,0), (0,0,400,500), 1, 7)
|
||||
#PLAYGROUND.blit(surface_menu, (20,20))
|
||||
|
||||
Reference in New Issue
Block a user