diff --git a/.idea/DSZI.iml b/.idea/DSZI.iml index 252f3ef..0267347 100644 --- a/.idea/DSZI.iml +++ b/.idea/DSZI.iml @@ -5,7 +5,7 @@ - + diff --git a/.idea/misc.xml b/.idea/misc.xml index d209534..a2e120d 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,4 +1,4 @@ - + \ No newline at end of file diff --git a/Restaurant/main.py b/Restaurant/main.py index e2bb7f1..11984e4 100644 --- a/Restaurant/main.py +++ b/Restaurant/main.py @@ -582,8 +582,13 @@ def button(msg, x, y, w, h, ic, ac, action=None): pygame.draw.rect(window, ic, (x, y, w, h)) smallText = pygame.font.Font("freesansbold.ttf", 15) - textSurf, textRect = text_objects(msg, smallText) - textRect.center = ((x+(w/2)), (y+(h/2))) + words = [msg.split(' ')] + textSurf, textRect = text_objects(words[0][0], smallText) + textRect.center = ((x+(w/2)), (y+(h/4))) + window.blit(textSurf, textRect) + + textSurf, textRect = text_objects(words[0][1], smallText) + textRect.center = ((x + (w / 2)), (y + (3*h / 4))) window.blit(textSurf, textRect) @@ -599,9 +604,10 @@ def redrawWindow(surface): surface.blit(image, (puddles[i][0] * sizeBetween + 1, puddles[i][1] * sizeBetween + 1)) drawGrid(width, rows, surface) - button("Rozpoznawanie talerzy", 0, width + 1, 198, 48, light_beige, white) - button("Ciężkostrawność dań", 200, width + 1, 198, 48, light_beige, white) - button("Rozpoznawanie banknotów", 400, width + 1, 198, 48, light_beige, white) + button("Rozpoznawanie talerzy", 0, width + 1, 150, 48, light_beige, white) + button("Ciężkostrawność dań", 150, width + 1, 150, 48, light_beige, white) + button("Rozpoznawanie banknotów", 300, width + 1, 150, 48, light_beige, white) + button("Polecanie dań", 450, width + 1, 150, 48, light_beige, white) pygame.display.update() @@ -690,7 +696,7 @@ def main(): pln_model = Sequential() recognizeCash(pln_model) - #pln_model.load_weights('Kinga/model_payment.h5') + pln_model.load_weights('Kinga/model_payment.h5') width = 600 rows = 15 @@ -732,9 +738,10 @@ def main(): if event.type == pygame.QUIT: pygame.quit() quit() - button("Rozpoznawanie talerzy", 0, width + 1, 198, 48, light_beige, white, classify) - button("Ciężkostrawność dań", 200, width + 1, 198, 48, light_beige, white, evaluate) - button("Rozpoznawanie banknotów", 400, width + 1, 198, 48, light_beige, white, payment) + button("Rozpoznawanie talerzy", 0, width + 1, 150, 48, light_beige, white, classify) + button("Ciężkostrawność dań", 150, width + 1, 150, 48, light_beige, white, evaluate) + button("Rozpoznawanie banknotów", 300, width + 1, 150, 48, light_beige, white, payment) + button("Polecanie dań", 450, width + 1, 150, 48, light_beige, white) #Natalia tu dopisz swoją funkcję :) redrawWindow(window) pygame.quit()