small getStaticBitmap and getBitmap mod to accept a path

This commit is contained in:
unknown
2010-08-15 14:42:41 +03:00
committed by cncfanatics
parent f79f0d803b
commit 6442c99038
4 changed files with 20 additions and 20 deletions

View File

@@ -21,11 +21,11 @@ import os.path
import config
import wx
def getStaticBitmap(name, parent):
def getStaticBitmap(name, parent, location):
static = wx.StaticBitmap(parent)
static.SetBitmap(getBitmap(name))
static.SetBitmap(getBitmap(name,location))
return static
def getBitmap(name):
path = os.path.join(config.path, "icons", name + ".png")
def getBitmap(name,location):
path = os.path.join(config.path, location, name + ".png")
return wx.Image(path).ConvertToBitmap()