Example #1
0
 def addText(self, stringList, col=(255,255,255)):
     if isinstance(stringList, str):
         temp = stringList
         stringList = []
         stringList.append(temp)
     
     for string in stringList:
         thisRow = Row(string, self.theFont, self.cursorY, self.imgFolder, self.mode)
         rowImage = thisRow.getImage()
         self.allElements.append(thisRow)
     
         self.checkResize(self.cursorY + rowImage.get_height())
         self.image.blit(rowImage, (0, self.cursorY))
         self.cursorY += rowImage.get_height() + self.CURSOR_BORDER_INCREMENT        
Example #2
0
    def addGroceryList(self, groceryList, col=(255,255,255)):
        if isinstance(groceryList, Ingredient):
            temp = groceryList
            groceryList = []
            groceryList.append(temp)

        for ingredient in groceryList:
            thisRow = Row(ingredient.getReadableName(),
                          self.theFont, self.cursorY, self.imgFolder, self.mode, ingredient)
            rowImage = thisRow.getImage()
            self.allElements.append(thisRow)
        
            self.checkResize(self.cursorY + rowImage.get_height())
            self.image.blit(rowImage, (0, self.cursorY))
            self.cursorY += rowImage.get_height() + self.CURSOR_BORDER_INCREMENT