Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ################################################################################
- ## Инициализация
- ################################################################################
- init offset = -1
- ################################################################################
- ## Стили
- ################################################################################
- style default:
- properties gui.text_properties()
- language gui.language
- style input:
- properties gui.text_properties("input", accent=True)
- adjust_spacing False
- style hyperlink_text:
- properties gui.text_properties("hyperlink", accent=True)
- hover_underline True
- style gui_text:
- properties gui.text_properties("interface")
- style button:
- properties gui.button_properties("button")
- style button_text is gui_text:
- properties gui.text_properties("button")
- yalign 0.5
- style label_text is gui_text:
- properties gui.text_properties("label", accent=True)
- style prompt_text is gui_text:
- properties gui.text_properties("prompt")
- style bar:
- ysize gui.bar_size
- left_bar Frame("gui/bar/left.png", gui.bar_borders, tile=gui.bar_tile)
- right_bar Frame("gui/bar/right.png", gui.bar_borders, tile=gui.bar_tile)
- style vbar:
- xsize gui.bar_size
- top_bar Frame("gui/bar/top.png", gui.vbar_borders, tile=gui.bar_tile)
- bottom_bar Frame("gui/bar/bottom.png", gui.vbar_borders, tile=gui.bar_tile)
- style scrollbar:
- ysize gui.scrollbar_size
- base_bar Frame("gui/scrollbar/horizontal_[prefix_]bar.png", gui.scrollbar_borders, tile=gui.scrollbar_tile)
- thumb Frame("gui/scrollbar/horizontal_[prefix_]thumb.png", gui.scrollbar_borders, tile=gui.scrollbar_tile)
- style vscrollbar:
- xsize gui.scrollbar_size
- base_bar Frame("gui/scrollbar/vertical_[prefix_]bar.png", gui.vscrollbar_borders, tile=gui.scrollbar_tile)
- thumb Frame("gui/scrollbar/vertical_[prefix_]thumb.png", gui.vscrollbar_borders, tile=gui.scrollbar_tile)
- style slider:
- ysize gui.slider_size
- base_bar Frame("gui/slider/horizontal_[prefix_]bar.png", gui.slider_borders, tile=gui.slider_tile)
- thumb "gui/slider/horizontal_[prefix_]thumb.png"
- style vslider:
- xsize gui.slider_size
- base_bar Frame("gui/slider/vertical_[prefix_]bar.png", gui.vslider_borders, tile=gui.slider_tile)
- thumb "gui/slider/vertical_[prefix_]thumb.png"
- style frame:
- padding gui.frame_borders.padding
- background Frame("gui/aboutbg.png", gui.frame_borders, tile=gui.frame_tile)
- ################################################################################
- ## Внутриигровые экраны
- ################################################################################
- ## Экран разговора #############################################################
- ##
- ## Экран разговора используется для показа диалога игроку. Он использует два
- ## параметра — who и what — что, соответственно, имя говорящего персонажа и
- ## показываемый текст. (Параметр who может быть None, если имя не задано.)
- ##
- ## Этот экран должен создать текст с id "what", чтобы Ren'Py могла показать
- ## текст. Здесь также можно создать наложения с id "who" и id "window", чтобы
- ## применить к ним настройки стиля.
- ##
- ## https://www.renpy.org/doc/html/screen_special.html#say
- screen say(who, what):
- style_prefix "say"
- window:
- id "window"
- if who is not None:
- window:
- id "namebox"
- style "namebox"
- text who id "who"
- text what id "what"
- ## Если есть боковое изображение ("голова"), показывает её поверх текста.
- ## По стандарту не показывается на варианте для мобильных устройств — мало
- ## места.
- if not renpy.variant("small"):
- add SideImage() xalign 0.0 yalign 1.0
- ## Делает namebox доступным для стилизации через объект Character.
- init python:
- config.character_id_prefixes.append('namebox')
- style window is default
- style say_label is default
- style say_dialogue is default
- style say_thought is say_dialogue
- style namebox is default
- style namebox_label is say_label
- style window:
- xalign 0.5
- xfill True
- yalign gui.textbox_yalign
- ysize gui.textbox_height
- background Image("gui/textbox.png", xalign=0.5, yalign=1.0)
- style namebox:
- xpos gui.name_xpos
- xanchor gui.name_xalign
- xsize gui.namebox_width
- ypos gui.name_ypos
- ysize gui.namebox_height
- background Frame("gui/namebox.png", gui.namebox_borders, tile=gui.namebox_tile, xalign=gui.name_xalign)
- padding gui.namebox_borders.padding
- style say_label:
- properties gui.text_properties("name", accent=True)
- xalign gui.name_xalign
- yalign 0.5
- style say_dialogue:
- properties gui.text_properties("dialogue")
- xpos gui.dialogue_xpos
- xsize gui.dialogue_width
- ypos gui.dialogue_ypos
- ####################Интро##################################
- #image splash = "splash.png"
- #label splashscreen:
- # scene black
- # with Pause(1)
- # play sound "ping.ogg"
- # show splash with dissolve
- # with Pause(2)
- # scene black with dissolve
- # with Pause(1)
- # return
- ## Экран ввода #################################################################
- ##
- ## Этот экран используется, чтобы показывать renpy.input. Это параметр запроса,
- ## используемый для того, чтобы дать игроку ввести в него текст.
- ##
- ## Этот экран должен создать наложение ввода с id "input", чтобы принять
- ## различные вводимые параметры.
- ##
- ## https://www.renpy.org/doc/html/screen_special.html#input
- screen input(prompt):
- style_prefix "input"
- window:
- vbox:
- xalign gui.dialogue_text_xalign
- xpos gui.dialogue_xpos
- xsize gui.dialogue_width
- ypos gui.dialogue_ypos
- text prompt style "input_prompt"
- input id "input"
- style input_prompt is default
- style input_prompt:
- xalign gui.dialogue_text_xalign
- properties gui.text_properties("input_prompt")
- style input:
- xalign gui.dialogue_text_xalign
- xmaximum gui.dialogue_width
- ## Экран выбора ################################################################
- ##
- ## Этот экран используется, чтобы показывать внутриигровые выборы,
- ## представленные оператором menu. Один параметр, вложения, список объектов,
- ## каждый с заголовком и полями действия.
- ##
- ## https://www.renpy.org/doc/html/screen_special.html#choice
- screen choice(items):
- style_prefix "choice"
- vbox:
- for i in items:
- textbutton i.caption action i.action
- ## Когда этот параметр True, заголовки меню будут проговариваться рассказчиком.
- ## Когда False, заголовки меню будут показаны как пустые кнопки.
- define config.narrator_menu = True
- style choice_vbox is vbox
- style choice_button is button
- style choice_button_text is button_text
- style choice_vbox:
- xalign 0.5
- ypos 405
- yanchor 0.5
- spacing gui.choice_spacing
- style choice_button is default:
- properties gui.button_properties("choice_button")
- style choice_button_text is default:
- properties gui.button_text_properties("choice_button")
- ## Экран быстрого меню #########################################################
- ##
- ## Быстрое меню показывается внутри игры, чтобы обеспечить лёгкий доступ к
- ## внеигровым меню.
- screen quick_menu:
- tag menu
- vbox:
- pos (1760, 950)
- textbutton _("Назад") action Rollback()
- imagebutton auto "gui/pause/pause_arrow_%s.png" action ShowMenu("pause_menu")
- ## Данный код гарантирует, что экран быстрого меню будет показан в игре в любое
- ## время, если только игрок не скроет интерфейс.
- init python:
- config.overlay_screens.append("quick_menu")
- default quick_menu = True
- style quick_button is default
- style quick_button_text is button_text
- style quick_button:
- properties gui.button_properties("quick_button")
- style quick_button_text:
- properties gui.button_text_properties("quick_button")
- ################################################################################
- ## Экраны Главного и Игрового меню
- ################################################################################
- ## Экран навигации #############################################################
- ##
- ## Этот экран включает в себя главное и игровое меню, и обеспечивает навигацию к
- ## другим меню и к началу игры.
- screen navigation():
- vbox:
- style_prefix "navigation"
- xpos gui.navigation_xpos
- yalign 0.5
- spacing gui.navigation_spacing
- textbutton _("История") action ShowMenu("history")
- textbutton _("Сохранить") action ShowMenu("save")
- textbutton _("Загрузить") action ShowMenu("load")
- textbutton _("Настройки") action ShowMenu("preferences")
- if _in_replay:
- textbutton _("Завершить повтор") action EndReplay(confirm=True)
- elif not main_menu:
- textbutton _("Главное меню") action MainMenu()
- textbutton _("Об игре") action ShowMenu("about")
- if renpy.variant("pc"):
- ## Помощь не необходима и не относится к мобильным устройствам.
- textbutton _("Помощь") action ShowMenu("help")
- style navigation_button is gui_button
- style navigation_button_text is gui_button_text
- style navigation_button:
- size_group "navigation"
- properties gui.button_properties("navigation_button")
- style navigation_button_text:
- properties gui.button_text_properties("navigation_button")
- ## Экран главного меню #########################################################
- ##
- ## Используется, чтобы показать главное меню после запуска игры.
- ##
- screen main_menu:
- # This ensures that any other menu screen is replaced.
- tag menu
- imagemap:
- ground "gui/main_menu.png"
- hover "gui/hover_menu.png"
- alpha True
- hotspot (714, 432, 484, 93) action Start()
- hotspot (713, 530, 493, 56) action ShowMenu("load")
- hotspot (712, 672, 507, 68) action ShowMenu("about")
- hotspot (713, 591, 501, 77) action ShowMenu("preferences")
- hotspot (712, 744, 515, 70) action Help()
- hotspot (715, 818, 497, 82) action Quit(confirm=True)
- ################################################################################
- screen pause_menu:
- tag menu
- imagemap:
- ground "gui/pause/pause_ground.png"
- hover "gui/pause/pause_ground.png"
- alpha True
- hotspot (1, 1, 1, 1) action ShowMenu('history')
- hotspot (1, 1, 1, 1) action Skip() alternate Skip(fast=True, confirm=True)
- hotspot (1, 1, 1, 1) action Preference("auto-forward", "toggle")
- hotspot (1, 1, 1, 1) action ShowMenu('save')
- hotspot (1, 1, 1, 1) action ShowMenu('preferences')
- hotspot (1, 1, 1, 1) action MainMenu()
- hotspot (1, 1, 1, 1) action HideInterface()
- ## Экран игрового меню #########################################################
- ##
- ## Всё это показывает основную, обобщённую структуру экрана игрового меню. Он
- ## вызывается с экраном заголовка и показывает фон, заголовок и навигацию.
- ##
- ## Параметр scroll может быть None, или "viewport", или "vpgrid", когда этот
- ## экран предназначается для использования с более чем одним дочерним экраном,
- ## включённым в него.
- screen game_menu(title, scroll=None, yinitial=0.0):
- style_prefix "game_menu"
- if main_menu:
- add gui.main_menu_background
- else:
- add gui.game_menu_background
- frame:
- style "game_menu_outer_frame"
- hbox:
- ## Резервирует пространство для навигации.
- frame:
- style "game_menu_navigation_frame"
- frame:
- style "game_menu_content_frame"
- if scroll == "viewport":
- viewport:
- yinitial yinitial
- scrollbars "vertical"
- mousewheel True
- draggable True
- pagekeys True
- side_yfill True
- vbox:
- transclude
- elif scroll == "vpgrid":
- vpgrid:
- cols 1
- yinitial yinitial
- scrollbars "vertical"
- mousewheel True
- draggable True
- pagekeys True
- side_yfill True
- transclude
- else:
- transclude
- use navigation
- textbutton _("Вернуться"):
- style "return_button"
- action Return()
- label title
- if main_menu:
- key "game_menu" action ShowMenu("main_menu")
- style game_menu_outer_frame is empty
- style game_menu_navigation_frame is empty
- style game_menu_content_frame is empty
- style game_menu_viewport is gui_viewport
- style game_menu_side is gui_side
- style game_menu_scrollbar is gui_vscrollbar
- style game_menu_label is gui_label
- style game_menu_label_text is gui_label_text
- style return_button is navigation_button
- style return_button_text is navigation_button_text
- style game_menu_outer_frame:
- bottom_padding 45
- top_padding 180
- background "gui/overlay/game_menu.png"
- style game_menu_navigation_frame:
- xsize 420
- yfill True
- style game_menu_content_frame:
- left_margin 60
- right_margin 30
- top_margin 15
- style game_menu_viewport:
- xsize 1380
- style game_menu_vscrollbar:
- unscrollable gui.unscrollable
- style game_menu_side:
- spacing 15
- style game_menu_label:
- xpos 75
- ysize 180
- style game_menu_label_text:
- size gui.title_text_size
- color gui.accent_color
- yalign 0.5
- style return_button:
- xpos gui.navigation_xpos
- yalign 1.0
- yoffset -45
- ## Экран Об игре ###############################################################
- ##
- ## Этот экран показывает авторскую информацию об игре и Ren'Py.
- ##
- ## В этом экране нет ничего особенного, и он служит только примером того, каким
- ## можно сделать свой экран.
- screen about():
- # This ensures that any other menu screen is replaced.
- tag menu
- imagemap:
- ground "gui/aboutbg.png"
- hover "gui/about_hover.png"
- alpha True
- hotspot (72, 956, 247, 93) action Return()
- text _("{size=+12}{p}{p}{p}{p}{p} Senior Lead Developer: {a=http://vk.com/olegvalge} OlegValge{/a} {p}{p} This Terrible Design: {a=http://vk.com/maslenok_1337} Maslenok{/a} {p}{p} Plot Author: Sielin{/size}")
- ## Save, Load
- ## Screens that allow the user to save and load the game.
- ##Save screen starts here
- screen load_save_slot:
- #shows information in the save slot about the saved game file
- #shows a screenshot of the saved game in the save slot
- add FileScreenshot(1) xpos 125 ypos 200
- add FileScreenshot(2) xpos 750 ypos 200
- add FileScreenshot(3) xpos 1400 ypos 200
- add FileScreenshot(4) xpos 100 ypos 600
- add FileScreenshot(5) xpos 750 ypos 600
- add FileScreenshot(6) xpos 1400 ypos 600
- ####key "save_delete" action FileDelete(number)####### не работает#########################
- screen file_picker:
- imagebutton:
- idle "gui/SaveLoad/slot_idle.png"
- hover "gui/SaveLoad/slot_hover.png"
- xpos 100
- ypos 200
- action FileAction(1)
- use load_save_slot(number=1)
- imagebutton:
- idle "gui/SaveLoad/slot_idle.png"
- hover "gui/SaveLoad/slot_hover.png"
- xpos 750
- ypos 200
- action FileAction(2)
- use load_save_slot(number=2)
- imagebutton:
- idle "gui/SaveLoad/slot_idle.png"
- hover "gui/SaveLoad/slot_hover.png"
- xpos 1400
- ypos 200
- action FileAction(3)
- use load_save_slot(number=3)
- imagebutton:
- idle "gui/SaveLoad/slot_idle.png"
- hover "gui/SaveLoad/slot_hover.png"
- xpos 100
- ypos 600
- action FileAction(4)
- use load_save_slot(number=4)
- imagebutton:
- idle "gui/SaveLoad/slot_idle.png"
- hover "gui/SaveLoad/slot_hover.png"
- xpos 750
- ypos 600
- action FileAction(5)
- use load_save_slot(number=5)
- imagebutton:
- idle "gui/SaveLoad/slot_idle.png"
- hover "gui/SaveLoad/slot_hover.png"
- xpos 1400
- ypos 600
- action FileAction(6)
- use load_save_slot(number=6)
- ############## SAVE SCREEN
- screen save:
- tag menu
- add "gui/aboutbg.png"
- use file_picker
- imagebutton:
- idle "gui/SaveLoad/close_idle.png"
- hover "gui/SaveLoad/close_hover.png"
- xpos 100
- ypos 980
- action Return()
- imagebutton:
- idle "gui/SaveLoad/arrow_left_idle.png"
- hover "gui/SaveLoad/arrow_left_hover.png"
- xpos 500
- ypos 950
- action FilePagePrevious()
- imagebutton:
- idle "gui/SaveLoad/arrow_right_idle.png"
- hover "gui/SaveLoad/arrow_right_hover.png"
- xpos 1370
- ypos 950
- action FilePageNext(max=9)
- imagebutton:
- idle "gui/SaveLoad/1_idle.png"
- hover "gui/SaveLoad/1_hover.png"
- selected_idle "gui/SaveLoad/1_hover.png"
- xpos 630
- ypos 960
- clicked FilePage(1)
- imagebutton:
- idle "gui/SaveLoad/2_idle.png"
- hover "gui/SaveLoad/2_hover.png"
- selected_idle "gui/SaveLoad/2_hover.png"
- xpos 680
- ypos 960
- clicked FilePage(2)
- imagebutton:
- idle "gui/SaveLoad/3_idle.png"
- hover "gui/SaveLoad/3_hover.png"
- selected_idle "gui/SaveLoad/3_hover.png"
- xpos 760
- ypos 960
- clicked FilePage(3)
- imagebutton:
- idle "gui/SaveLoad/4_idle.png"
- hover "gui/SaveLoad/4_hover.png"
- selected_idle "gui/SaveLoad/4_hover.png"
- xpos 840
- ypos 960
- clicked FilePage(4)
- imagebutton:
- idle "gui/SaveLoad/5_idle.png"
- hover "gui/SaveLoad/5_hover.png"
- selected_idle "gui/SaveLoad/5_hover.png"
- xpos 920
- ypos 960
- clicked FilePage(5)
- imagebutton:
- idle "gui/SaveLoad/6_idle.png"
- hover "gui/SaveLoad/6_hover.png"
- selected_idle "gui/SaveLoad/6_hover.png"
- xpos 1000
- ypos 960
- clicked FilePage(6)
- imagebutton:
- idle "gui/SaveLoad/7_idle.png"
- hover "gui/SaveLoad/7_hover.png"
- selected_idle "gui/SaveLoad/8_hover.png"
- xpos 1080
- ypos 960
- clicked FilePage(7)
- imagebutton:
- idle "gui/SaveLoad/8_idle.png"
- hover "gui/SaveLoad/8_hover.png"
- selected_idle "gui/SaveLoad/8_hover.png"
- xpos 1160
- ypos 960
- clicked FilePage(8)
- imagebutton:
- idle "gui/SaveLoad/9_idle.png"
- hover "gui/SaveLoad/9_hover.png"
- selected_idle "gui/SaveLoad/9_hover.png"
- xpos 1240
- ypos 960
- clicked FilePage(9)
- ############# LOAD SCREEN
- screen load:
- tag menu
- add "gui/aboutbg.png"
- use file_picker
- imagebutton:
- idle "gui/SaveLoad/close_idle.png"
- hover "gui/SaveLoad/close_hover.png"
- xpos 100
- ypos 980
- action Return()
- imagebutton:
- idle "gui/SaveLoad/arrow_left_idle.png"
- hover "gui/SaveLoad/arrow_left_hover.png"
- xpos 500
- ypos 950
- action FilePagePrevious()
- imagebutton:
- idle "gui/SaveLoad/arrow_right_idle.png"
- hover "gui/SaveLoad/arrow_right_hover.png"
- xpos 1370
- ypos 950
- action FilePageNext(max=9)
- imagebutton:
- idle "gui/SaveLoad/1_idle.png"
- hover "gui/SaveLoad/1_hover.png"
- selected_idle "gui/SaveLoad/1_hover.png"
- xpos 630
- ypos 960
- clicked FilePage(1)
- imagebutton:
- idle "gui/SaveLoad/2_idle.png"
- hover "gui/SaveLoad/2_hover.png"
- selected_idle "gui/SaveLoad/2_hover.png"
- xpos 680
- ypos 960
- clicked FilePage(2)
- imagebutton:
- idle "gui/SaveLoad/3_idle.png"
- hover "gui/SaveLoad/3_hover.png"
- selected_idle "gui/SaveLoad/3_hover.png"
- xpos 760
- ypos 960
- clicked FilePage(3)
- imagebutton:
- idle "gui/SaveLoad/4_idle.png"
- hover "gui/SaveLoad/4_hover.png"
- selected_idle "gui/SaveLoad/4_hover.png"
- xpos 840
- ypos 960
- clicked FilePage(4)
- imagebutton:
- idle "gui/SaveLoad/5_idle.png"
- hover "gui/SaveLoad/5_hover.png"
- selected_idle "gui/SaveLoad/5_hover.png"
- xpos 920
- ypos 960
- clicked FilePage(5)
- imagebutton:
- idle "gui/SaveLoad/6_idle.png"
- hover "gui/SaveLoad/6_hover.png"
- selected_idle "gui/SaveLoad/6_hover.png"
- xpos 1000
- ypos 960
- clicked FilePage(6)
- imagebutton:
- idle "gui/SaveLoad/7_idle.png"
- hover "gui/SaveLoad/7_hover.png"
- selected_idle "gui/SaveLoad/8_hover.png"
- xpos 1080
- ypos 960
- clicked FilePage(7)
- imagebutton:
- idle "gui/SaveLoad/8_idle.png"
- hover "gui/SaveLoad/8_hover.png"
- selected_idle "gui/SaveLoad/8_hover.png"
- xpos 1160
- ypos 960
- clicked FilePage(8)
- imagebutton:
- idle "gui/SaveLoad/9_idle.png"
- hover "gui/SaveLoad/9_hover.png"
- selected_idle "gui/SaveLoad/9_hover.png"
- xpos 1240
- ypos 960
- clicked FilePage(9)
- ## Экран настроек ##############################################################
- ##
- ## Экран настроек позволяет игроку настраивать игру под себя.
- ##
- ## https://www.renpy.org/doc/html/screen_special.html#preferences
- screen preferences():
- tag menu
- imagemap:
- ground "gui/prefbg.png"
- idle "gui/prefbutton_idle.png"
- hover "gui/prefbg_hover.png"
- selected_idle "gui/prefbutton_selected.png"
- selected_hover "gui/prefbutton_selected.png"
- alpha False
- hotspot (178, 381, 488, 104) action Preference("display", "fullscreen")
- hotspot (178, 278, 488, 104) action Preference("display", "window")
- hotspot (178, 617, 488, 185) action Preference("skip", "seen")
- hotspot (178, 801, 488, 164) action Preference("skip", "all")
- hotspot (72, 956, 247, 93) action Return()
- ######################## hotspot (1, 1, 1, 1) action Preference("mute")
- bar pos (1100, 860) value Preference("text speed") style "pref_slider"
- text str(int(_preferences.text_cps / 200.00*100))+"%" align (0.96, 0.84) size (55)
- bar pos (1100, 500) value Preference("sound volume") style "pref_slider"
- text str(int(_preferences.volumes["sfx"]*100))+"%" align (0.96, 0.48) size (55)
- bar pos (1100, 300) value Preference("music volume") style "pref_slider"
- text str(int(_preferences.volumes["music"]*100))+"%" align (0.96, 0.29) size (55)
- bar pos (1100, 680) value Preference("auto-forward time") style "pref_slider"
- text str(int(_preferences.afm_time / 30.00*100))+"%" align (0.96, 0.66) size (55)
- init -2 python:
- style.pref_slider.left_bar = "gui/prefbar_full.png"
- style.pref_slider.right_bar = "gui/prefbar_empty.png"
- style.pref_slider.xmaximum = 621
- style.pref_slider.ymaximum = 44
- style.pref_slider.thumb = "gui/prefthumb.png"
- style.pref_slider.thumb_offset = 4
- style.pref_slider.thumb_shadow = None
- ## Экран истории ###############################################################
- ##
- ## Этот экран показывает игроку историю диалогов. Хотя в этом экране нет ничего
- ## особенного, он имеет доступ к истории диалогов, хранимом в _history_list.
- ##
- ## https://www.renpy.org/doc/html/history.html
- screen history():
- tag menu
- ## Избегайте предсказывания этого экрана, так как он может быть очень
- ## массивным.
- predict False
- use game_menu(_("История"), scroll=("vpgrid" if gui.history_height else "viewport"), yinitial=1.0):
- style_prefix "history"
- for h in _history_list:
- window:
- ## Это всё правильно уравняет, если history_height будет
- ## установлен на None.
- has fixed:
- yfit True
- if h.who:
- label h.who:
- style "history_name"
- substitute False
- ## Берёт цвет из who параметра персонажа, если он
- ## установлен.
- if "color" in h.who_args:
- text_color h.who_args["color"]
- $ what = renpy.filter_text_tags(h.what, allow=gui.history_allow_tags)
- text what:
- substitute False
- if not _history_list:
- label _("История диалогов пуста.")
- ## Это определяет, какие теги могут отображаться на экране истории.
- define gui.history_allow_tags = set()
- style history_window is empty
- style history_name is gui_label
- style history_name_text is gui_label_text
- style history_text is gui_text
- style history_text is gui_text
- style history_label is gui_label
- style history_label_text is gui_label_text
- style history_window:
- xfill True
- ysize gui.history_height
- style history_name:
- xpos gui.history_name_xpos
- xanchor gui.history_name_xalign
- ypos gui.history_name_ypos
- xsize gui.history_name_width
- style history_name_text:
- min_width gui.history_name_width
- text_align gui.history_name_xalign
- style history_text:
- xpos gui.history_text_xpos
- ypos gui.history_text_ypos
- xanchor gui.history_text_xalign
- xsize gui.history_text_width
- min_width gui.history_text_width
- text_align gui.history_text_xalign
- layout ("subtitle" if gui.history_text_xalign else "tex")
- style history_label:
- xfill True
- style history_label_text:
- xalign 0.5
- ## Экран помощи ################################################################
- ##
- ## Экран, дающий информацию о клавишах управления. Он использует другие экраны
- ## (keyboard_help, mouse_help, и gamepad_help), чтобы показывать актуальную
- ## помощь.
- screen help():
- # This ensures that any other menu screen is replaced.
- tag menu
- imagemap:
- ground "gui/helpbg.png"
- hover "gui/about_hover.png"
- alpha True
- hotspot (72, 956, 247, 93) action Return()
- ################################################################################
- ## Дополнительные экраны
- ################################################################################
- ## Экран подтверждения #########################################################
- ##
- ## Экран подтверждения вызывается, когда Ren'Py хочет спросить у игрока вопрос
- ## Да или Нет.
- ##
- ## https://www.renpy.org/doc/html/screen_special.html#confirm
- ## Экран уведомлений ###########################################################
- ##
- ## Экран уведомлений используется, чтобы показать игроку оповещение. (Например,
- ## когда игра автосохранилась, или был сделан скриншот)
- ##
- ## https://www.renpy.org/doc/html/screen_special.html#notify-screen
- screen notify(message):
- zorder 100
- style_prefix "notify"
- frame at notify_appear:
- text "[message!tq]"
- timer 3.25 action Hide('notify')
- transform notify_appear:
- on show:
- alpha 0
- linear .25 alpha 1.0
- on hide:
- linear .5 alpha 0.0
- style notify_frame is empty
- style notify_text is gui_text
- style notify_frame:
- ypos gui.notify_ypos
- background Frame("gui/notify.png", gui.notify_frame_borders, tile=gui.frame_tile)
- padding gui.notify_frame_borders.padding
- style notify_text:
- properties gui.text_properties("notify")
- ## Экран NVL ###################################################################
- ##
- ## Этот экран используется в диалогах и меню режима NVL.
- ##
- ## https://www.renpy.org/doc/html/screen_special.html#nvl
- screen nvl(dialogue, items=None):
- window:
- style "nvl_window"
- has vbox:
- spacing gui.nvl_spacing
- ## Показывает диалог или в vpgrid, или в vbox.
- if gui.nvl_height:
- vpgrid:
- cols 1
- yinitial 1.0
- use nvl_dialogue(dialogue)
- else:
- use nvl_dialogue(dialogue)
- ## Показывает меню, если есть. Меню может показываться некорректно, если
- ## config.narrator_menu установлено на True.
- for i in items:
- textbutton i.caption:
- action i.action
- style "nvl_button"
- add SideImage() xalign 0.0 yalign 1.0
- screen nvl_dialogue(dialogue):
- for d in dialogue:
- window:
- id d.window_id
- fixed:
- yfit gui.nvl_height is None
- if d.who is not None:
- text d.who:
- id d.who_id
- text d.what:
- id d.what_id
- ## Это контролирует максимальное число строк NVL, могущих показываться за раз.
- define config.nvl_list_length = gui.nvl_list_length
- style nvl_window is default
- style nvl_entry is default
- style nvl_label is say_label
- style nvl_dialogue is say_dialogue
- style nvl_button is button
- style nvl_button_text is button_text
- style nvl_window:
- xfill True
- yfill True
- background "gui/nvl.png"
- padding gui.nvl_borders.padding
- style nvl_entry:
- xfill True
- ysize gui.nvl_height
- style nvl_label:
- xpos gui.nvl_name_xpos
- xanchor gui.nvl_name_xalign
- ypos gui.nvl_name_ypos
- yanchor 0.0
- xsize gui.nvl_name_width
- min_width gui.nvl_name_width
- text_align gui.nvl_name_xalign
- style nvl_dialogue:
- xpos gui.nvl_text_xpos
- xanchor gui.nvl_text_xalign
- ypos gui.nvl_text_ypos
- xsize gui.nvl_text_width
- min_width gui.nvl_text_width
- text_align gui.nvl_text_xalign
- layout ("subtitle" if gui.nvl_text_xalign else "tex")
- style nvl_thought:
- xpos gui.nvl_thought_xpos
- xanchor gui.nvl_thought_xalign
- ypos gui.nvl_thought_ypos
- xsize gui.nvl_thought_width
- min_width gui.nvl_thought_width
- text_align gui.nvl_thought_xalign
- layout ("subtitle" if gui.nvl_text_xalign else "tex")
- style nvl_button:
- properties gui.button_properties("nvl_button")
- xpos gui.nvl_button_xpos
- xanchor gui.nvl_button_xalign
- style nvl_button_text:
- properties gui.button_text_properties("nvl_button")
- ################################################################################
- ## Мобильные варианты
- ################################################################################
- style pref_vbox:
- variant "medium"
- xsize 675
- ## Раз мышь может не использоваться, мы заменили быстрое меню версией,
- ## использующей меньше кнопок, но больших по размеру, чтобы их было легче
- ## касаться.
- screen quick_menu():
- ## Гарантирует, что оно появляется поверх других экранов.
- zorder 100
- if quick_menu:
- hbox:
- style_prefix "quick"
- xalign 0.5
- yalign 1.0
- textbutton _("Назад") action Rollback()
- textbutton _("История") action ShowMenu('history')
- textbutton _("Пропуск") action Skip() alternate Skip(fast=True, confirm=True)
- textbutton _("Авто") action Preference("auto-forward", "toggle")
- textbutton _("Сохранить") action ShowMenu('save')
- textbutton _("Опции") action ShowMenu('preferences')
- textbutton _("Глав.Меню") action MainMenu()
- textbutton _("Скрыть текст") action HideInterface()
- style window:
- variant "small"
- background "gui/phone/textbox.png"
- style radio_button:
- variant "small"
- foreground "gui/phone/button/check_[prefix_]foreground.png"
- style check_button:
- variant "small"
- foreground "gui/phone/button/check_[prefix_]foreground.png"
- style nvl_window:
- variant "small"
- background "gui/phone/nvl.png"
- style main_menu_frame:
- variant "small"
- background "gui/phone/overlay/main_menu.png"
- style game_menu_outer_frame:
- variant "small"
- background "gui/phone/overlay/game_menu.png"
- style game_menu_navigation_frame:
- variant "small"
- xsize 510
- style game_menu_content_frame:
- variant "small"
- top_margin 0
- style pref_vbox:
- variant "small"
- xsize 600
- style bar:
- variant "small"
- ysize gui.bar_size
- left_bar Frame("gui/phone/bar/left.png", gui.bar_borders, tile=gui.bar_tile)
- right_bar Frame("gui/phone/bar/right.png", gui.bar_borders, tile=gui.bar_tile)
- style vbar:
- variant "small"
- xsize gui.bar_size
- top_bar Frame("gui/phone/bar/top.png", gui.vbar_borders, tile=gui.bar_tile)
- bottom_bar Frame("gui/phone/bar/bottom.png", gui.vbar_borders, tile=gui.bar_tile)
- style scrollbar:
- variant "small"
- ysize gui.scrollbar_size
- base_bar Frame("gui/phone/scrollbar/horizontal_[prefix_]bar.png", gui.scrollbar_borders, tile=gui.scrollbar_tile)
- thumb Frame("gui/phone/scrollbar/horizontal_[prefix_]thumb.png", gui.scrollbar_borders, tile=gui.scrollbar_tile)
- style vscrollbar:
- variant "small"
- xsize gui.scrollbar_size
- base_bar Frame("gui/phone/scrollbar/vertical_[prefix_]bar.png", gui.vscrollbar_borders, tile=gui.scrollbar_tile)
- thumb Frame("gui/phone/scrollbar/vertical_[prefix_]thumb.png", gui.vscrollbar_borders, tile=gui.scrollbar_tile)
- style slider:
- variant "small"
- ysize gui.slider_size
- base_bar Frame("gui/phone/slider/horizontal_[prefix_]bar.png", gui.slider_borders, tile=gui.slider_tile)
- thumb "gui/phone/slider/horizontal_[prefix_]thumb.png"
- style vslider:
- variant "small"
- xsize gui.slider_size
- base_bar Frame("gui/phone/slider/vertical_[prefix_]bar.png", gui.vslider_borders, tile=gui.slider_tile)
- thumb "gui/phone/slider/vertical_[prefix_]thumb.png"
- style slider_pref_vbox:
- variant "small"
- xsize None
- style slider_pref_slider:
- variant "small"
- xsize 900
- ####################################################
- screen yesno_prompt:
- modal True
- imagemap:
- ground 'gui/confirm/ground.png'
- idle 'gui/confirm/idle.png'
- hover 'gui/confirm/hover.png'
- hotspot (580, 559, 268, 135) action yes_action
- hotspot (1045, 564, 276, 126) action no_action
- if message == layout.ARE_YOU_SURE:
- add "gui/confirm/are_you_sure.png"
- elif message == layout.DELETE_SAVE:
- add "gui/confirm/delete_save.png"
- elif message == layout.OVERWRITE_SAVE:
- add "gui/confirm/overwrite_save.png"
- elif message == layout.LOADING:
- add "gui/confirm/loading.png"
- elif message == layout.QUIT:
- add "gui/confirm/quit.png"
- elif message == layout.MAIN_MENU:
- add "gui/confirm/main_menu.png"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement