Add icon for pyfa: 3D rendered rifter

This commit is contained in:
cncfanatics
2010-08-21 00:27:20 +02:00
parent b76d929b76
commit 4bd7e7c47e
3 changed files with 10 additions and 1 deletions

View File

@@ -29,6 +29,11 @@ def getStaticBitmap(name, parent, location):
locationMap = {"pack": os.path.join(config.homePath, "icons")}
def getBitmap(name,location):
icon = getImage(name, location)
if icon is not None:
return icon.ConvertToBitmap()
def getImage(name, location):
if location in locationMap:
location = locationMap[location]
path = os.path.join(location, "icon%s.png" % name)
@@ -37,4 +42,4 @@ def getBitmap(name,location):
path = os.path.join(location, name + ".png")
if os.path.exists(path):
return wx.Image(path).ConvertToBitmap()
return wx.Image(path)