[RenPy] 纯文本查看 复制代码
# 定义一个全空的按键映射字典
define empty_keymap = dict(
rollback = [ ],
screenshot = [ ],
toggle_afm = [ ],
toggle_fullscreen = [ ],
game_menu = [ ],
hide_windows = [ ],
launch_editor = [ ],
dump_styles = [ ],
reload_game = [ ],
inspector = [ ],
full_inspector = [ ],
developer = [ ],
quit = [ ],
iconify = [ ],
help = [ ],
choose_renderer = [ ],
progress_screen = [ ],
accessibility = [ ],
# Accessibility.
self_voicing = [ ],
clipboard_voicing = [ ],
debug_voicing = [ ],
# Say.
rollforward = [ ],
dismiss = [ ],
dismiss_unfocused = [ ],
# Pause.
dismiss_hard_pause = [ ],
# Focus.
focus_left = [ ],
focus_right = [ ],
focus_up = [ ],
focus_down = [ ],
# Button.
button_ignore = [ ],
button_select = [ ],
button_alternate = [ ],
button_alternate_ignore = [ ],
# Input.
input_backspace = [ ],
input_enter = [ ],
input_left = [ ],
input_right = [ ],
input_up = [ ],
input_down = [ ],
input_delete = [ ],
input_home = [ ],
input_end = [ ],
input_copy = [ ],
input_paste = [ ],
# Viewport.
viewport_leftarrow = [ ],
viewport_rightarrow = [ ],
viewport_uparrow = [ ],
viewport_downarrow = [ ],
viewport_wheelup = [ ],
viewport_wheeldown = [ ],
viewport_drag_start = [ ],
viewport_drag_end = [ ],
viewport_pageup = [ ],
viewport_pagedown = [ ],
# These keys control skipping.
skip = [ ],
stop_skipping = [ ],
toggle_skip = [ ],
fast_skip = [ ],
# Bar.
bar_activate = [ ],
bar_deactivate = [ ],
bar_left = [ ],
bar_right = [ ],
bar_up = [ ],
bar_down = [ ],
# Delete a save.
save_delete = [ ],
# Draggable.
drag_activate = [ ],
drag_deactivate = [ ],
# Debug console.
console = [ ],
console_older = [ ],
console_newer = [ ],
# Director
director = [ ],
# Ignored (kept for backwards compatibility).
toggle_music = [ ],
viewport_up = [ ],
viewport_down = [ ],
# Profile commands.
performance = [ ],
image_load_log = [ ],
profile_once = [ ],
memory_profile = [ ],
)
label start:
"您已创建一个新的 Ren'Py 游戏。"
"此处会禁用所有输入5秒。"
python:
# 清空所有按键映射
temp_keymap = config.keymap.copy()
config.keymap.clear()
config.keymap = empty_keymap.copy()
renpy.clear_keymap_cache()
renpy.pause(5.0, hard=True)
# 恢复所有按键映射
config.keymap.clear()
config.keymap = temp_keymap.copy()
renpy.clear_keymap_cache()