本文整理汇总了Python中asciimatics.screen.Screen.from_blessed方法的典型用法代码示例。如果您正苦于以下问题:Python Screen.from_blessed方法的具体用法?Python Screen.from_blessed怎么用?Python Screen.from_blessed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类asciimatics.screen.Screen
的用法示例。
在下文中一共展示了Screen.from_blessed方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _credits
# 需要导入模块: from asciimatics.screen import Screen [as 别名]
# 或者: from asciimatics.screen.Screen import from_blessed [as 别名]
def _credits(term):
screen = Screen.from_blessed(term)
scenes = []
centre = (screen.width // 2, screen.height // 2)
curve_path = []
for i in range(0, 11):
curve_path.append(
(centre[0] + (screen.width / 3 * math.sin(i * math.pi / 5)),
centre[1] - (screen.height / 3 * math.cos(i * math.pi / 5))))
path = Path()
path.jump_to(-20, centre[1] - screen.height // 3)
path.move_straight_to(centre[0], centre[1] - screen.height // 3, 10),
path.wait(30)
path.move_round_to(curve_path, 80)
path.wait(30)
path.move_straight_to(7, 4, 10)
path.wait(300)
effects = [
Sam(screen, path),
Print(screen,
SpeechBubble("WELCOME TO ASCIIMATICS", "L"),
x=centre[0] + 12, y=(centre[1] - screen.height // 3) - 4,
colour=Screen.COLOUR_CYAN,
clear=True,
start_frame=20,
stop_frame=50),
Print(screen,
SpeechBubble("Wheeeeeee!"),
y=centre[1],
colour=Screen.COLOUR_CYAN,
clear=True,
start_frame=100,
stop_frame=250),
Print(screen,
SpeechBubble("A world of possibilities awaits you...", "L"),
x=18, y=0,
colour=Screen.COLOUR_CYAN,
clear=True,
start_frame=350,
stop_frame=400),
Print(screen, ImageFile("globe.gif"), 0,
start_frame=400),
]
scenes.append(Scene(effects, 600))
effects = [
Matrix(screen, stop_frame=200),
Mirage(
screen,
FigletText("Asciimatics"),
screen.height // 2 - 3,
Screen.COLOUR_GREEN,
start_frame=100,
stop_frame=200),
Wipe(screen, start_frame=150),
Cycle(
screen,
FigletText("Asciimatics"),
screen.height // 2 - 3,
start_frame=200)
]
scenes.append(Scene(effects, 250, clear=False))
effects = [
BannerText(
screen,
Rainbow(screen, FigletText(
"Reliving the 80s in glorious ASCII text...", font='slant')),
screen.height // 2 - 3,
Screen.COLOUR_GREEN)
]
scenes.append(Scene(effects))
effects = [
Mirage(
screen,
FigletText("Conceived and"),
screen.height,
Screen.COLOUR_GREEN),
Mirage(
screen,
FigletText("written by:"),
screen.height + 8,
Screen.COLOUR_GREEN),
Mirage(
screen,
FigletText("Peter Brittain"),
screen.height + 16,
Screen.COLOUR_GREEN),
Scroll(screen, 3)
]
scenes.append(Scene(effects, (screen.height + 24) * 3))
effects = [
Cycle(
screen,
FigletText("ASCIIMATICS", font='big'),
screen.height // 2 - 8),
#.........这里部分代码省略.........