Esempio n. 1
0
def create_resource_icon(res_id, db):
    """Creates a pychan Icon for a resource. Helptext is set to name of *res_id*.
	@param res_id: resource id
	@param db: dbreader for main db"""
    widget = Icon(image=get_res_icon_path(res_id))
    widget.helptext = db.get_res_name(res_id)
    widget.scale = True
    return widget
Esempio n. 2
0
def create_resource_icon(res_id, db):
	"""Creates a pychan Icon for a resource. Helptext is set to name of *res_id*.
	@param res_id: resource id
	@param db: dbreader for main db"""
	widget = Icon(image=get_res_icon_path(res_id))
	widget.helptext = db.get_res_name(res_id)
	widget.scale = True
	return widget