add initial tutorial menu
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
self.env['general']['tutorialMode'] = False
|
||||
return _('You are leaving the tutorial mode. Press that shortcut again to enter the tutorial mode again.')
|
||||
|
||||
def run(self):
|
||||
text = _('you entered the tutorial mode. In that mode the commands are not executed. but you get a description of what the shortcut does. To leave the tutorial mode, press that shortcut again.')
|
||||
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
|
||||
self.env['general']['tutorialMode'] = True
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
2
src/fenrir/commands/help/Readme.txt
Normal file
2
src/fenrir/commands/help/Readme.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
this folder contains help and tutorial related functions.
|
||||
those are not bindable but hard coded.
|
22
src/fenrir/commands/help/curr_help.py
Normal file
22
src/fenrir/commands/help/curr_help.py
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('get current help message')
|
||||
def run(self):
|
||||
text = self.env['runtime']['helpManager'].getHelpForCurrentIndex()
|
||||
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
23
src/fenrir/commands/help/next_help.py
Normal file
23
src/fenrir/commands/help/next_help.py
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('get next help message')
|
||||
def run(self):
|
||||
self.env['runtime']['helpManager'].nextIndex()
|
||||
text = self.env['runtime']['helpManager'].getHelpForCurrentIndex()
|
||||
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
23
src/fenrir/commands/help/prev_help.py
Normal file
23
src/fenrir/commands/help/prev_help.py
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('get prev help message')
|
||||
def run(self):
|
||||
self.env['runtime']['helpManager'].prevIndex()
|
||||
text = self.env['runtime']['helpManager'].getHelpForCurrentIndex()
|
||||
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
29
src/fenrir/commands/help/toggle_tutorial_mode.py
Normal file
29
src/fenrir/commands/help/toggle_tutorial_mode.py
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Toggle the Tutorial mode')
|
||||
def run(self):
|
||||
print('TM')
|
||||
text = ''
|
||||
if self.env['runtime']['helpManager'].isTutorialMode():
|
||||
text = _('You are leaving the tutorial mode. Press that shortcut again to enter the tutorial mode again.')
|
||||
else:
|
||||
text = _('you entered the tutorial mode. In that mode the commands are not executed. but you get a description of what the shortcut does. To leave the tutorial mode, press that shortcut again.')
|
||||
self.env['runtime']['helpManager'].toggleTutorialMode()
|
||||
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
Reference in New Issue
Block a user