new: users can now customize the faces via config.yml (ui.faces)
This commit is contained in:
1 parent
99e0a31ea8
commit
cd5d783c52
3 files changed
+89
-61
No files matched your search
@@ -16,3 +16,8 @@ SAD = '(╥☁╥ )'
|
||||
FRIEND = '(♥‿‿♥)'
|
||||
BROKEN = '(☓‿‿☓)'
|
||||
DEBUG = '(#__#)'
|
||||
|
||||
|
||||
def load_from_config(config):
|
||||
for face_name, face_value in config.items():
|
||||
globals()[face_name.upper()] = face_value
|
||||
@@ -22,6 +22,9 @@ class View(object):
|
||||
def __init__(self, config, impl, state=None):
|
||||
global ROOT
|
||||
|
||||
# setup faces from the configuration in case the user customized them
|
||||
faces.load_from_config(config['ui']['faces'])
|
||||
|
||||
self._render_cbs = []
|
||||
self._config = config
|
||||
self._canvas = None
|
||||
|
||||
Reference in new issue
Block a user