util/BitmapLibrary.py
changeset 815 e4f24593a758
parent 814 5743cbdff669
child 1571 486f94a8032c
equal deleted inserted replaced
814:5743cbdff669 815:e4f24593a758
    36 #-------------------------------------------------------------------------------
    36 #-------------------------------------------------------------------------------
    37 #                             Library Helpers
    37 #                             Library Helpers
    38 #-------------------------------------------------------------------------------
    38 #-------------------------------------------------------------------------------
    39 
    39 
    40 def AddBitmapFolder(path):
    40 def AddBitmapFolder(path):
    41     if path not in BitmapFolders:
    41     if os.path.exists(path) and os.path.isdir(path) and path not in BitmapFolders:
    42         BitmapFolders.append(path)
    42         BitmapFolders.append(path)
    43 
    43 
    44 def SearchBitmap(bmp_name):
    44 def SearchBitmap(bmp_name):
    45     for folder in BitmapFolders:
    45     for folder in BitmapFolders:
    46         bmp_path = os.path.join(folder, bmp_name + ".png")
    46         bmp_path = os.path.join(folder, bmp_name + ".png")