本文整理汇总了Python中actions.Actions.can_redo方法的典型用法代码示例。如果您正苦于以下问题:Python Actions.can_redo方法的具体用法?Python Actions.can_redo怎么用?Python Actions.can_redo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类actions.Actions
的用法示例。
在下文中一共展示了Actions.can_redo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Actions
# 需要导入模块: from actions import Actions [as 别名]
# 或者: from actions.Actions import can_redo [as 别名]
actions = Actions()
leftClick = rightClick = False
while running:
for event in pygame.event.get():
if QUIT == event.type:
running = False
elif KEYUP == event.type:
if K_g == event.key:
model = model.update_position( Point( 0, 0, 0 ) )
elif K_i == event.key:
mode = Mode.INSERT
elif K_u == event.key:
if actions.can_undo():
actions.undo()
elif K_r == event.key:
if actions.can_redo():
actions.redo()
elif K_ESCAPE == event.key:
mode = Mode.COMMAND
elif len( objects ) > 0 and K_RETURN == event.key:
actions.do( \
( objects[ -1 ].close, [] ), \
( objects[ -1 ].open, [] ) \
)
elif K_o == event.key: mode = Mode.OBSERVE
elif K_v == event.key: mode = Mode.VISUAL
if K_COLON | KMOD_SHIFT == event.key and Mode.COMMAND == mode:
command = enter_command( screen )
if Command.EDIT == command[ 0 ]:
filename = command[ 1 ][ 0 ]
if not filename.endswith( '.3d' ):