def drawLoadingMenu(): global list_id global pill_id global pill_name i=0 for med in medManager.getInventory(1): if(i == list_id): pill_name = med[1] pill_id = med[0] i=i+1 myfont = pygame.font.SysFont("monospace", 15) label = myfont.render('Push the \'Load\'', 1, WHITE) DISPLAYSURF.blit(label, (10, HEADER+20)) label = myfont.render('once for each pill you', 1, WHITE) DISPLAYSURF.blit(label, (10, HEADER+35)) label = myfont.render('want to load of:', 1, WHITE) DISPLAYSURF.blit(label, (10, HEADER+50)) label = myfont.render(pill_name, 1, WHITE) DISPLAYSURF.blit(label, (10, HEADER+75)) pygame.draw.rect(DISPLAYSURF, LIGHT, BUTTON_5) DISPLAYSURF.blit(IMAGE_PILL, (125,HEADER+BORDER+110)) myfont = pygame.font.SysFont("monospace", 15) label = myfont.render("Load", 1, BLACK) DISPLAYSURF.blit(label, (117, 210)) pygame.draw.rect(DISPLAYSURF, MID, BUTTON_6) DISPLAYSURF.blit(IMAGE_BACK, (225,HEADER+BORDER+110)) myfont = pygame.font.SysFont("monospace", 15) label = myfont.render("Back", 1, BLACK) DISPLAYSURF.blit(label, (237, 210))
def drawVendingMenu(): global list_id global pill_id global pill_name i=0 for med in medManager.getInventory(0): if(i == list_id): pill_name = med[1] pill_id = med[0] i=i+1 myfont = pygame.font.SysFont("monospace", 15) label = myfont.render('Push the \'Dispense\'', 1, WHITE) DISPLAYSURF.blit(label, (10, HEADER+20)) label = myfont.render('button one more time', 1, WHITE) DISPLAYSURF.blit(label, (10, HEADER+35)) label = myfont.render('to dispense one pill of:', 1, WHITE) DISPLAYSURF.blit(label, (10, HEADER+50)) label = myfont.render(pill_name, 1, WHITE) DISPLAYSURF.blit(label, (10, HEADER+75)) pygame.draw.rect(DISPLAYSURF, LIGHT, BUTTON_5) DISPLAYSURF.blit(IMAGE_PILL, (125,HEADER+BORDER+110)) myfont = pygame.font.SysFont("monospace", 15) label = myfont.render("Dispense", 1, BLACK) DISPLAYSURF.blit(label, (117, 210)) pygame.draw.rect(DISPLAYSURF, MID, BUTTON_6) DISPLAYSURF.blit(IMAGE_BACK, (225,HEADER+BORDER+110)) myfont = pygame.font.SysFont("monospace", 15) label = myfont.render("Back", 1, BLACK) DISPLAYSURF.blit(label, (237, 210))
def drawManageMenu(): global list_position global list_next pygame.draw.rect(DISPLAYSURF, LIGHT, LIST_1) pygame.draw.rect(DISPLAYSURF, LIGHT, LIST_2) pygame.draw.rect(DISPLAYSURF, LIGHT, LIST_3) pygame.draw.rect(DISPLAYSURF, LIGHT, LIST_4) myfont = pygame.font.SysFont("monospace", 15) i=0 for med in medManager.getInventory(1): if(i >= list_position): label = myfont.render(med[1], 1, BLACK) DISPLAYSURF.blit(label, (15, HEADER+20+50*(i-list_position))) print(med[1]) i=i+1 list_next = i - list_position if(list_position > 0): pygame.draw.rect(DISPLAYSURF, MID, LIST_UP) else: pygame.draw.rect(DISPLAYSURF, DARK, LIST_UP) label = myfont.render("Last", 1, BLACK) DISPLAYSURF.blit(label, (215, HEADER+20)) if(list_next > 4): pygame.draw.rect(DISPLAYSURF, MID, LIST_DN) else: pygame.draw.rect(DISPLAYSURF, DARK, LIST_DN) label = myfont.render("Next", 1, BLACK) DISPLAYSURF.blit(label, (215, HEADER+70)) pygame.draw.rect(DISPLAYSURF, MID, BUTTON_6) DISPLAYSURF.blit(IMAGE_BACK, (225,HEADER+BORDER+110)) myfont = pygame.font.SysFont("monospace", 15) label = myfont.render("Back", 1, BLACK) DISPLAYSURF.blit(label, (237, 210))