本文整理汇总了Python中scc.osd.OSDWindow._add_arguments方法的典型用法代码示例。如果您正苦于以下问题:Python OSDWindow._add_arguments方法的具体用法?Python OSDWindow._add_arguments怎么用?Python OSDWindow._add_arguments使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类scc.osd.OSDWindow
的用法示例。
在下文中一共展示了OSDWindow._add_arguments方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _add_arguments
# 需要导入模块: from scc.osd import OSDWindow [as 别名]
# 或者: from scc.osd.OSDWindow import _add_arguments [as 别名]
def _add_arguments(self):
OSDWindow._add_arguments(self)
self.argparser.add_argument('--control-with', '-c', type=str,
metavar="option", default=STICK, choices=(LEFT, RIGHT, STICK),
help="which pad or stick should be used to navigate menu (default: %s)" % (STICK,))
self.argparser.add_argument('--confirm-with', type=str,
metavar="button", default='A',
help="button used to confirm choice (default: A)")
self.argparser.add_argument('--cancel-with', type=str,
metavar="button", default='B',
help="button used to cancel menu (default: B)")
self.argparser.add_argument('--confirm-with-release', action='store_true',
help="confirm choice with button release instead of button press")
self.argparser.add_argument('--cancel-with-release', action='store_true',
help="cancel menu with button release instead of button press")
self.argparser.add_argument('--use-cursor', '-u', action='store_true',
help="display and use cursor")
self.argparser.add_argument('--from-profile', '-p', type=str,
metavar="profile_file menu_name",
help="load menu items from profile file")
self.argparser.add_argument('--from-file', '-f', type=str,
metavar="filename",
help="load menu items from json file")
self.argparser.add_argument('--print-items', action='store_true',
help="prints menu items to stdout")
self.argparser.add_argument('items', type=str, nargs='*', metavar='id title',
help="Menu items")
示例2: _add_arguments
# 需要导入模块: from scc.osd import OSDWindow [as 别名]
# 或者: from scc.osd.OSDWindow import _add_arguments [as 别名]
def _add_arguments(self):
OSDWindow._add_arguments(self)
self.argparser.add_argument('--control-with', '-c', type=str,
metavar="option", default=DEFAULT, choices=(DEFAULT, LEFT, RIGHT, STICK),
help="which pad or stick should be used to navigate menu")
self.argparser.add_argument('--confirm-with', type=str,
metavar="button", default=DEFAULT,
help="button used to confirm choice")
self.argparser.add_argument('--cancel-with', type=str,
metavar="button", default=DEFAULT,
help="button used to cancel menu")
self.argparser.add_argument('--confirm-with-release', action='store_true',
help="confirm choice with button release instead of button press")
self.argparser.add_argument('--cancel-with-release', action='store_true',
help="cancel menu with button release instead of button press")
self.argparser.add_argument('--use-cursor', '-u', action='store_true',
help="display and use cursor")
self.argparser.add_argument('--size', type=int,
help="sets prefered width or height")
self.argparser.add_argument('--feedback-amplitude', type=int,
help="enables and sets power of feedback effect generated when active menu option is changed")
self.argparser.add_argument('--from-profile', '-p', type=str,
metavar="profile_file menu_name",
help="load menu items from profile file")
self.argparser.add_argument('--from-file', '-f', type=str,
metavar="filename",
help="load menu items from json file")
self.argparser.add_argument('--print-items', action='store_true',
help="prints menu items to stdout")
self.argparser.add_argument('items', type=str, nargs='*', metavar='id title',
help="Menu items")
示例3: _add_arguments
# 需要导入模块: from scc.osd import OSDWindow [as 别名]
# 或者: from scc.osd.OSDWindow import _add_arguments [as 别名]
def _add_arguments(self):
OSDWindow._add_arguments(self)
self.argparser.add_argument('-t', type=float, metavar="seconds",
default=5, help="time before message is hidden (default: 5; 0 means forever)")
self.argparser.add_argument('-s', type=int, metavar="size",
default=3, help="font size, in range 1 to 3 (default: 3)")
self.argparser.add_argument('text', type=str, help="text to display")
示例4: _add_arguments
# 需要导入模块: from scc.osd import OSDWindow [as 别名]
# 或者: from scc.osd.OSDWindow import _add_arguments [as 别名]
def _add_arguments(self):
OSDWindow._add_arguments(self)
self.argparser.add_argument('image', type=str, nargs="?",
default = self.bdisplay, help="keyboard image to use")
self.argparser.add_argument('--cancel-with', type=str,
metavar="button", default='B',
help="button used to close display (default: B)")
示例5: _add_arguments
# 需要导入模块: from scc.osd import OSDWindow [as 别名]
# 或者: from scc.osd.OSDWindow import _add_arguments [as 别名]
def _add_arguments(self):
OSDWindow._add_arguments(self)
self.argparser.add_argument('--confirm-with', type=str,
metavar="button", default=DEFAULT,
help="button used to confirm choice")
self.argparser.add_argument('--cancel-with', type=str,
metavar="button", default=DEFAULT,
help="button used to cancel dialog")
self.argparser.add_argument('--feedback-amplitude', type=int,
help="enables and sets power of feedback effect generated when active menu option is changed")
示例6: _add_arguments
# 需要导入模块: from scc.osd import OSDWindow [as 别名]
# 或者: from scc.osd.OSDWindow import _add_arguments [as 别名]
def _add_arguments(self):
OSDWindow._add_arguments(self)
self.argparser.add_argument('--cancel-with', type=str,
metavar="button", default='START',
help="button used to cancel menu (default: START)")
self.argparser.add_argument('--timeout', type=int,
default=5,
help="how many seconds before menu is automatically canceled")
self.argparser.add_argument('--cancel-with-release', action='store_true',
help="cancel menu with button release instead of button press")
self.argparser.add_argument('--from-profile', '-p', type=str,
metavar="profile_file menu_name",
help="load menu items from profile file")
self.argparser.add_argument('--from-file', '-f', type=str,
metavar="filename",
help="load menu items from json file")
self.argparser.add_argument('--print-items', action='store_true',
help="prints menu items to stdout")
self.argparser.add_argument('items', type=str, nargs='*', metavar='id title',
help="Menu items")
示例7: _add_arguments
# 需要导入模块: from scc.osd import OSDWindow [as 别名]
# 或者: from scc.osd.OSDWindow import _add_arguments [as 别名]
def _add_arguments(self):
OSDWindow._add_arguments(self)
self.argparser.add_argument('-t', type=float, metavar="seconds",
default=5, help="time before message is hidden (default: 5)")
self.argparser.add_argument('text', type=str, help="text to display")
示例8: _add_arguments
# 需要导入模块: from scc.osd import OSDWindow [as 别名]
# 或者: from scc.osd.OSDWindow import _add_arguments [as 别名]
def _add_arguments(self):
OSDWindow._add_arguments(self)
self.argparser.add_argument('--width', type=int, metavar="pixels", default=20,
help="""area width in pixels""")
self.argparser.add_argument('--height', type=int, metavar="pixels", default=-20,
help="""area height in pixels""")
示例9: _add_arguments
# 需要导入模块: from scc.osd import OSDWindow [as 别名]
# 或者: from scc.osd.OSDWindow import _add_arguments [as 别名]
def _add_arguments(self):
OSDWindow._add_arguments(self)
self.argparser.add_argument('image', type=str, nargs="?",
default = self.kbimage, help="keyboard image to use")
示例10: _add_arguments
# 需要导入模块: from scc.osd import OSDWindow [as 别名]
# 或者: from scc.osd.OSDWindow import _add_arguments [as 别名]
def _add_arguments(self):
OSDWindow._add_arguments(self)
self.argparser.add_argument('--control-with', '-c', type=str,
metavar="option", default=LEFT, choices=(LEFT, RIGHT),
help="which pad should be used to generate gesture menu (default: %s)" % (LEFT,))