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

Method update

brainworkshop.py:2828–2876  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2826 anchor_x='left', anchor_y='top', batch=batch)
2827 self.update()
2828 def update(self):
2829 str_list = []
2830 if mode.started:
2831 self.label.y = from_top_edge(30)
2832 if not mode.hide_text:
2833 str_list.append(_('P: Pause / Unpause\n'))
2834 str_list.append('\n')
2835 str_list.append(_('F8: Hide / Reveal Text\n'))
2836 str_list.append('\n')
2837 str_list.append(_('ESC: Cancel Session\n'))
2838 elif CLINICAL_MODE:
2839 self.label.y = from_top_edge(30)
2840 str_list.append(_('ESC: Exit'))
2841 else:
2842 if mode.manual or cfg.JAEGGI_MODE:
2843 self.label.y = from_top_edge(30)
2844 else:
2845 self.label.y = from_top_edge(40)
2846 if 'morse' in cfg.AUDIO1_SETS or 'morse' in cfg.AUDIO2_SETS:
2847 str_list.append(_('J: Morse Code Reference\n'))
2848 str_list.append('\n')
2849 str_list.append(_('H: Help / Tutorial\n'))
2850 str_list.append('\n')
2851 if mode.manual:
2852 str_list.extend([
2853 _('F1: Decrease N-Back\n'),
2854 _('F2: Increase N-Back\n'), '\n',
2855 _('F3: Decrease Trials\n'),
2856 _('F4: Increase Trials\n'), '\n'])
2857 if mode.manual:
2858 str_list.extend([
2859 _('F5: Decrease Speed\n'),
2860 _('F6: Increase Speed\n'), '\n',
2861 _('C: Choose Game Type\n'),
2862 _('S: Select Sounds\n')])
2863 str_list.append(_('I: Select Images\n'))
2864 if mode.manual:
2865 str_list.append(_('M: Standard Mode\n'))
2866 else:
2867 str_list.extend([
2868 _('M: Manual Mode\n'),
2869 _('D: Donate\n'), '\n',
2870 _('G: Daily Progress Graph\n'), '\n',
2871 _('W: Brain Workshop Web Site\n')])
2872 if cfg.WINDOW_FULLSCREEN:
2873 str_list.append(_('E: Saccadic Eye Exercise\n'))
2874 str_list.extend(['\n', _('ESC: Exit\n')])
2875
2876 self.label.text = ''.join(str_list)
2877
2878class TitleMessageLabel:
2879 def __init__(self):

Callers 1

__init__Method · 0.95

Calls 1

from_top_edgeFunction · 0.85

Tested by

no test coverage detected