MCPcopy Create free account
hub / github.com/brain-workshop/brainworkshop / update

Method update

brainworkshop.py:3069–3090  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3067 #self.label.draw()
3068
3069 def update(self):
3070 if mode.started and not mode.hide_text and self.modality in mode.modalities[mode.mode]: # still necessary?
3071 self.label.text = self.text
3072 else:
3073 self.label.text = ''
3074 if cfg.SHOW_FEEDBACK and mode.inputs[self.modality]:
3075 result = check_match(self.modality)
3076 #self.label.bold = True
3077 if result == 'correct':
3078 self.label.color = cfg.COLOR_LABEL_CORRECT
3079 elif result == 'unknown':
3080 self.label.color = cfg.COLOR_LABEL_OOPS
3081 elif result == 'incorrect':
3082 self.label.color = cfg.COLOR_LABEL_INCORRECT
3083 elif cfg.SHOW_FEEDBACK and (not mode.inputs['audiovis']) and mode.show_missed:
3084 result = check_match(self.modality, check_missed=True)
3085 if result == 'missed':
3086 self.label.color = cfg.COLOR_LABEL_OOPS
3087 #self.label.bold = True
3088 else:
3089 self.label.color = cfg.COLOR_TEXT
3090 self.label.bold = False
3091
3092 def delete(self):
3093 self.label.delete()

Callers 1

__init__Method · 0.95

Calls 1

check_matchFunction · 0.85

Tested by

no test coverage detected