
init -1:
    init 499 image gym1Avi = Movie(play="video/gym1.avi")
    init 499 image beach29Avi = Movie(play="video/2beach29.avi")
    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/frame.png", gui.frame_borders, tile=gui.frame_tile)

screen say(who, what):
    zorder 900

    style_prefix "say" tag saying

    if dialog_shown:

        if who is not None:
            window:
                id "window"
                yalign .965
                background Image("images/interface/dialog1.png", xalign=0.5, yalign=1.0)

                if who is not None:

                    window:
                        id "namebox"
                        style "namebox"
                        text who id "who"

                text what id "what" font "arialbi.ttf" drop_shadow (1,1) drop_shadow_color "#4d4d4d"

        else:
            window:
                id "window"
                yalign .965
                background Image("images/interface/dialog2.png", xalign=0.5, yalign=1.0)

                if who is not None:

                    window:
                        id "namebox"
                        style "namebox"
                        text who id "who"

                text what id "what" font "arialbi.ttf" drop_shadow (1,1) drop_shadow_color "#4d4d4d"
    key 'h' action Function(sh_dialog)
    if not dialog_shown:
        key 'mouseup_1' action Function(sh_dialog)
        key 'K_SPACE' action Function(sh_dialog)

    if not renpy.variant("small"):
        add SideImage() xalign 0.0 yalign 1.0

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

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

screen input(prompt):

    fixed:
        yalign .75
        xalign .25
        xsize 870
        ysize 423
        add "images/interface/start/frame_enter.png" xalign .5 yalign .5
        text prompt xalign .5 ypos 150 yanchor .5 size 50
        input id "input" xsize 353 xalign .5 yalign .5 yoffset 86 color "#474747" size 50 xmaximum 353

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

screen choice(items):
    style_prefix "choice"

    vbox:
        yalign .5
        for i in items:
            textbutton i.caption action i.action

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():

    modal True tag menu
    null width 1920 height 1080
    add "gui/overlay/confirm.png"
    add "images/frame_menu.png" yalign .5
    vbox:
        ypos 307
        imagebutton:
            idle "images/buttons/save.png"
            hover "images/buttons/save_active.png"
            action [Hide("quick_menu"),ShowMenu('save')]
        null width 363 height 6
        imagebutton:
            idle "images/buttons/load.png"
            hover "images/buttons/load_active.png"
            action NullAction()
        null width 363 height 6
        imagebutton:
            idle "images/buttons/options.png"
            hover "images/buttons/options_active.png"
            action NullAction()
        null width 363 height 6
        imagebutton:
            idle "images/buttons/menu1.png"
            hover "images/buttons/menu2.png"
            action NullAction()
        null width 363 height 6
        imagebutton:
            idle "images/buttons/back.png"
            hover "images/buttons/back_active.png"
            action Return()

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

        if main_menu:

            imagebutton:
                idle "/images/buttons/new.png"
                hover "/images/buttons/new_active.png"
                action Start()

        else:

            textbutton _("Сохранить") action ShowMenu("save")

        textbutton _("Загрузить") action ShowMenu("load")

        textbutton _("Настройки") action ShowMenu("preferences")

        textbutton _("Об игре") action ShowMenu("about")

        if renpy.variant("pc"):

            textbutton _("Помощь") action ShowMenu("help")

            textbutton _("Выход") action Quit(confirm=not main_menu)


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 m_menu_1:
    zorder 20
    null width 1920 height 1080
    vbox:
        ypos 263
        imagebutton:
            idle "images/buttons/new.png"
            hover "images/buttons/new_active.png"
            action Jump("begin_action")
        null width 363 height 6

screen m_menu_2:
    zorder 21
    null width 1920 height 1080
    vbox:
        ypos 263
        null width 363 height 88
        imagebutton:
            idle "images/buttons/load.png"
            hover "images/buttons/load_active.png"
            action Jump('show_load')
        null width 363 height 6

screen m_menu_3:
    zorder 22
    null width 1920 height 1080
    vbox:
        ypos 263
        null width 363 height 176
        imagebutton:
            idle "images/buttons/options.png"
            hover "images/buttons/options_active.png"
            action Jump("show_options")
        null width 363 height 6

screen m_menu_4:
    zorder 23
    null width 1920 height 1080
    vbox:
        ypos 263
        null width 363 height 264
        imagebutton:
            idle "images/buttons/gallery.png"
            hover "images/buttons/gallery_active.png"
            action Jump("show_gallery")
        null width 363 height 6

screen m_menu_5:
    zorder 24
    null width 1920 height 1080
    vbox:
        ypos 263
        null width 363 height 352
        imagebutton:
            idle "images/buttons/credits.png"
            hover "images/buttons/credits_active.png"
            action Jump("show_credits")
        null width 363 height 6

screen m_menu_6:
    zorder 25
    null width 1920 height 1080
    vbox:
        ypos 263
        null width 363 height 440
        imagebutton:
            idle "images/buttons/quit.png"
            hover "images/buttons/quit_active.png"
            action Quit(confirm=not main_menu)



screen m_menu:

    modal True
    zorder 10 tag menu
    null width 1920 height 1080
    vbox:
        ypos 263
        imagebutton:
            idle "images/buttons/new.png"
            hover "images/buttons/new_active.png"
            action [Hide("menu"),Jump("begin_action")]
        null width 363 height 6
        imagebutton:
            idle "images/buttons/load.png"
            hover "images/buttons/load_active.png"
            action [Hide("menu"),Jump('show_load')]
        null width 363 height 6
        imagebutton:
            idle "images/buttons/options.png"
            hover "images/buttons/options_active.png"
            action [Hide("menu"),Jump("show_options")]
        null width 363 height 6
        imagebutton:
            idle "images/buttons/gallery.png"
            hover "images/buttons/gallery_active.png"
            action Jump("show_gallery")
        null width 363 height 6
        imagebutton:
            idle "images/buttons/credits.png"
            hover "images/buttons/credits_active.png"
            action [Hide("menu"),Jump("show_credits")]
        null width 363 height 6
        imagebutton:
            idle "images/buttons/quit.png"
            hover "images/buttons/quit_active.png"
            action Quit(confirm=not main_menu)
        null height 15
        text version xalign .5 color "#e6e6e6" xoffset -2



screen m_menu_1_1:
    zorder 20
    null width 1920 height 1080
    vbox:
        ypos 263
        imagebutton:
            idle "images/buttons/standard.png"
            hover "images/buttons/standard_active.png"
            action Jump('sbegin')
        null width 363 height 6

screen m_menu_1_2:
    zorder 21
    null width 1920 height 1080
    vbox:
        ypos 263
        null width 363 height 88
        imagebutton:
            idle "images/buttons/free.png"
            hover "images/buttons/free_active.png"
            action Jump("fbegin")
        null width 363 height 6

screen m_menu_1_3:
    zorder 22
    null width 1920 height 1080
    vbox:
        ypos 263
        null width 363 height 440
        imagebutton:
            idle "images/buttons/back.png"
            hover "images/buttons/back_active.png"
            action Jump("bback")



screen credits:

    modal True
    zorder 11 tag menu
    add "images/frame_credits.png" xalign .5 yalign .5
    imagebutton:
        ypos 703
        idle "images/buttons/back.png"
        hover "images/buttons/back_active.png"
        action [Hide("credits"),Jump("hide_credits")]

init python:
    def full():
        if renpy.game.preferences.fullscreen == False:
            renpy.game.preferences.fullscreen = True
    def win():
        if renpy.game.preferences.fullscreen == True:
            renpy.game.preferences.fullscreen = False

screen options:

    modal True
    zorder 11 tag menu
    imagebutton:
        ypos 703
        idle "images/buttons/back.png"
        hover "images/buttons/back_active.png"
        action [Hide("options"),Jump("hide_options")]
    fixed:
        xpos 675 ypos 300 xmaximum 600
        vbox:
            label _("Music volume"):
                xalign .5
            bar value Preference("music volume")
            null height 50
            label _("Sound volume"):
                xalign .5
            bar value Preference("sound volume")
            null height 50
            label _("Display"):
                xalign .5
            null height 10
            hbox:
                xpos 70
                textbutton "Window" action win
                null width 200
                textbutton "Full" action full

screen quick_options():

    modal True
    zorder 16 tag menu
    null width 1920 height 1080
    add "images/frame_options.png" xalign .5 yalign .5
    button:
        focus_mask q_opt_scr_func
        action Return()
    fixed:
        xpos 675 ypos 300 xmaximum 600
        vbox:
            label _("Music volume"):
                xalign .5
            bar value Preference("music volume")
            null height 50
            label _("Sound volume"):
                xalign .5
            bar value Preference("sound volume")
            null height 50
            label _("Display"):
                xalign .5
            null height 10
            hbox:
                xpos 70
                textbutton "Window" action win
                null width 200
                textbutton "Full" action full
            null height 60

screen gallery(char, num):

    zorder 31 tag menu
    null width 1920 height 1080

    grid 2 6:
        xalign .8 yalign .5 xoffset -5 yoffset -5
        xspacing 1130
        yspacing 18
        for i in range(12):
            if len(g_array[i])>0 and len(g_array[i][0])>0:
                button:
                    xsize 131 ysize 125

                    if not i%2:
                        add "gui/button/left_frame.png" xzoom .5 yzoom .475 yalign .5 xanchor .2 xoffset -5
                    else:
                        add "gui/button/left_frame.png" xzoom -.5 yzoom .475 yalign .5 xanchor .2 xoffset -15
                    if i == 0:
                        add "images/interface/relationship/Rosie1.png":
                            xzoom .5 yzoom .5 yalign .5
                    elif i == 1:
                        add "images/interface/relationship/Lucy1.png":
                            xzoom .5 yzoom .5 yalign .5
                    elif i == 2:
                        if "Mika2" in rel_args:
                            add "images/interface/relationship/Mika4.png":
                                xzoom .5 yzoom .5 yalign .5
                        else:
                            add "images/interface/relationship/Mika1.png":
                                xzoom .5 yzoom .5 yalign .5
                    elif i == 3:
                        add "images/interface/relationship/May1.png":
                            xzoom .5 yzoom .5 yalign .5
                    else:
                        null width 131 height 125
                    if i == char:
                        add "gui/button/selected_gallery.png":
                            xzoom .5 yzoom .5 yalign .5
                    action Show("gallery",None,i,0)
            else:
                button:
                    xsize 131 ysize 125
                    null width 131 height 125
                    action NullAction()

    imagebutton:
        ypos 703
        idle "images/buttons/back.png"
        hover "images/buttons/back_active.png"
        action [Hide("gallery"),Jump("hide_gallery")]

    if len(g_array[char])>0 and len(g_array[char][0])>0:
        fixed:
            order_reverse True
            grid 4 5:
                style_prefix "slot"
                xalign 0.695
                yalign 0.45
                yspacing 22
                if char < 0:
                    $ char = 0
                if num < 1:
                    $ num = 1
                for i in range(20):
                    $ global g_array
                    $ slot = (num-1) * 20 + i
                    if slot < len(g_array[char]) and len(g_array[char]) > 0:
                        button:
                            add "gui/button/slot_background.png":
                                xpos -5 ypos -8 xzoom .645 yzoom .65
                            add g_array[char][slot][1]:
                                xzoom .132 yzoom .132 align (.5,.5) yoffset 10
                            if g_array[char][slot][0].find("1") >= 0:
                                add "gui/button/animation_gallery.png":
                                    align (.5,.5) yoffset 10
                            add "gui/button/plank1.png":
                                xpos -5 ypos -8 xzoom .645 yzoom .65
                            action Show("gallery_sinle",None,char,slot)
                    else:
                        button:
                            add "gui/button/slot_background.png":
                                xpos -5 ypos -8 xzoom .645 yzoom .65
                            add "gui/button/plank1.png":
                                xpos -5 ypos -8 xzoom .645 yzoom .65
                            action NullAction()

        hbox:
            xalign .59
            yalign .99
            if num>1:
                imagebutton:
                    idle "images/buttons/prev1.png"
                    hover "images/buttons/prev2.png"
                    action Show("gallery",None,char,num-1)


            if num*20 < len(g_array[char]):
                imagebutton:
                    idle "images/buttons/next1.png"
                    hover "images/buttons/next2.png"
                    action Show("gallery",None,char,num+1)



screen gallery_sinle(char, num):
    zorder 33
    modal True
    null width 1920 height 1080
    if g_array[char][num][0].find("0") >= 0:
        add g_array[char][num][2][0]
    elif g_array[char][num][0].find("1") >= 0:
        if g_array[char][num][1].find("images/events/2gym12.jpg") >= 0:

            add Movie(play="video/gym1.avi")
        elif g_array[char][num][1].find("images/events3/2beach30.jpg") >= 0:

            add Movie(play="video/2beach29.avi")
        else:
            add Movie(play=g_array[char][num][2][0])
    button:
        focus_mask None
        action Hide("gallery_sinle")



screen full_window:
    imagebutton:
        idle "images/buttons/tumb1.png"
        action [Hide("full_window"),Show("windowed"),Preference("display", "window")]

screen windowed:
    imagebutton:
        idle "images/buttons/tumb2.png"
        action [Hide("windowed"),Show("full_window"),Preference("display", "fullscreen")]

screen load_main:

    modal True tag menu
    default page_name_value = FilePageNameInputValue(pattern=_("{} страница"), auto=_("Автосохранения"), quick=_("Быстрые сохранения"))
    imagebutton:
        ypos 703
        idle "images/buttons/back.png"
        hover "images/buttons/back_active.png"
        action [Hide("load_main"),Jump("hide_load")]
    fixed:
        order_reverse True
        grid gui.file_slot_cols gui.file_slot_rows:
            style_prefix "slot"
            xalign 0.695
            yalign 0.45
            yspacing 22
            $ empty_slot = "Empty slot"
            for i in range(gui.file_slot_cols * gui.file_slot_rows):
                $ slot = i + 1
                button:
                    add "gui/button/slot_background.png":
                        xpos -5 ypos -8 xzoom .645 yzoom .65
                    action FileLoad(slot,confirm=False)
                    add FileScreenshot(slot) xalign 0.5 zoom .99
                    $ temp = FileTime(slot, format=_("{#file_time}%A, %d\n%B %Y, %H:%M"), empty=_(empty_slot))
                    if temp != empty_slot:
                        add "gui/button/plank.png":
                            xpos -5 ypos -8 xzoom .645 yzoom .65
                        text temp:
                            style "slot_time_text"
                            yalign .64
                        text FileSaveName(slot):
                            yalign .64
                            style "slot_name_text"
                        imagebutton:
                            xpos 212 ypos 3
                            idle "images/buttons/delete_inactive.png"
                            hover "images/buttons/delete_active.png"
                            action FileDelete(slot)
                    else:
                        add "gui/button/plank1.png":
                            xpos -5 ypos -8 xzoom .645 yzoom .65
    hbox:
        style_prefix "page"

        xalign .595
        yalign .99

        spacing gui.page_spacing

        imagebutton:
            idle "images/buttons/prev1.png"
            hover "images/buttons/prev2.png"
            action FilePagePrevious()
        for page in range(1, 10):
            textbutton "[page]" action FilePage(page)
        imagebutton:
            idle "images/buttons/next1.png"
            hover "images/buttons/next2.png"
            action FilePageNext()

screen white_screen:
    zorder 12
    add "images/white_1.png"

screen patreon:
    zorder 11
    imagebutton:
        xalign .98 yalign .98
        idle "images/buttons/patreon.png"
        hover "images/buttons/patreon_active.png"
        action OpenURL("https://www.patreon.com/CaizerGames")



style main_menu_frame is empty
style main_menu_vbox is vbox
style main_menu_text is gui_text
style main_menu_title is main_menu_text
style main_menu_version is main_menu_text

style main_menu_frame:
    xsize 420
    yfill True

    background "gui/overlay/main_menu.png"

style main_menu_vbox:
    xalign 1.0
    xoffset -30
    xmaximum 1200
    yalign 1.0
    yoffset -30

style main_menu_text:
    properties gui.text_properties("main_menu", accent=True)

style main_menu_title:
    properties gui.text_properties("title")

style main_menu_version:
    properties gui.text_properties("version")

screen game_menu(title, scroll=None, yinitial=0.0):

    hbox:
        transclude
    imagebutton:
        ypos 703
        idle "images/buttons/back.png"
        hover "images/buttons/back_active.png"
        action Hide("save")

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

define gui.about = ""


style about_label is gui_label
style about_label_text is gui_label_text
style about_text is gui_text

style about_label_text:
    size gui.label_text_size

screen save():
    zorder 998
    modal True tag menu
    null width 1920 height 1080
    button:
        focus_mask save_scr_func
        action Return()
    add "images/frame_load.png":
        xpos -140



    use file_slots(_("save"))
    vbox:
        ypos 263
        imagebutton:
            idle "images/buttons/load.png"
            hover "images/buttons/load_active.png"
            action [Hide("menu"),ShowMenu("load")]
        null width 363 height 6
        imagebutton:
            idle "images/buttons/options.png"
            hover "images/buttons/options_active.png"
            action [Hide("menu"),ShowMenu("quick_options")]
        null width 363 height 6
        imagebutton:
            idle "images/buttons/back.png"
            hover "images/buttons/back_active.png"
            action Hide("menu")
        null width 363 height 6
        imagebutton:
            idle "images/buttons/quit.png"
            hover "images/buttons/quit_active.png"
            action Quit(confirm=not main_menu)
        null height 15
        text version xalign .5 color "#e6e6e6" xoffset -2
    hbox:
        style_prefix "page"

        xalign 0.5
        yalign 1.0

        spacing gui.page_spacing

        imagebutton:
            idle "images/buttons/prev1.png"
            hover "images/buttons/prev2.png"
            action FilePagePrevious()
        for page in range(1, 10):
            textbutton "[page]" action FilePage(page)
        imagebutton:
            idle "images/buttons/next1.png"
            hover "images/buttons/next2.png"
            action FilePageNext()


screen load():
    zorder 998
    modal True tag menu
    null width 1920 height 1080
    button:
        focus_mask save_scr_func
        action Return()
    add "images/frame_load.png":
        xpos -140



    use file_slots(_("load"))
    vbox:
        ypos 263
        imagebutton:
            idle "images/buttons/save.png"
            hover "images/buttons/save_active.png"
            action [Hide("menu"),ShowMenu("save")]
        null width 363 height 6
        imagebutton:
            idle "images/buttons/options.png"
            hover "images/buttons/options_active.png"
            action [Hide("menu"),ShowMenu("quick_options")]
        null width 363 height 6
        imagebutton:
            idle "images/buttons/back.png"
            hover "images/buttons/back_active.png"
            action Hide("menu")
        null width 363 height 6
        imagebutton:
            idle "images/buttons/quit.png"
            hover "images/buttons/quit_active.png"
            action Quit(confirm=not main_menu)
        null height 15
        text version xalign .5 color "#e6e6e6" xoffset -2
    hbox:
        style_prefix "page"

        xalign 0.5
        yalign 1.0

        spacing gui.page_spacing

        imagebutton:
            idle "images/buttons/prev1.png"
            hover "images/buttons/prev2.png"
            action FilePagePrevious()
        for page in range(1, 10):
            textbutton "[page]" action FilePage(page)
        imagebutton:
            idle "images/buttons/next1.png"
            hover "images/buttons/next2.png"
            action FilePageNext()


screen file_slots(title):
    python:
        reset_music()
    default page_name_value = FilePageNameInputValue(pattern=_("{} страница"), auto=_("Автосохранения"), quick=_("Быстрые сохранения"))

    fixed:
        xpos -140

        grid gui.file_slot_cols gui.file_slot_rows:
            style_prefix "slot"
            xalign 0.695
            yalign 0.45
            yspacing 22
            $ empty_slot = "Empty slot"
            for i in range(gui.file_slot_cols * gui.file_slot_rows):
                $ slot = i + 1
                button:
                    action FileAction(slot)
                    has fixed
                    add "gui/button/slot_background.png":
                        xpos -7 ypos -8 xzoom .65 yzoom .65
                    add FileScreenshot(slot) xalign 0.5
                    $ temp = FileTime(slot, format=_("{#file_time}%A, %d\n%B %Y, %H:%M"), empty=_(empty_slot))
                    if temp != empty_slot:
                        add "gui/button/plank.png":
                            xpos -7 ypos -8 zoom .65
                        text temp:
                            style "slot_time_text"
                            yalign .64
                    else:
                        add "gui/button/plank1.png":
                            xpos -7 ypos -8 zoom .65
                    text FileSaveName(slot):
                        yalign .5
                        style "slot_name_text"
                    key "save_delete" action FileDelete(slot)
                    if temp != empty_slot:
                        imagebutton:
                            xpos 212 ypos 3
                            idle "images/buttons/delete_inactive.png"
                            hover "images/buttons/delete_active.png"
                            action FileDelete(slot)

    hbox:
        style_prefix "page"

        xalign 0.5
        yalign 1.0

        spacing gui.page_spacing

        imagebutton:
            idle "images/buttons/prev1.png"
            hover "images/buttons/prev2.png"
            action FilePagePrevious()
        for page in range(1, 10):
            textbutton "[page]" action FilePage(page)
        imagebutton:
            idle "images/buttons/next1.png"
            hover "images/buttons/next2.png"
            action FilePageNext()

style page_label is gui_label
style page_label_text is gui_label_text
style page_button is gui_button
style page_button_text is gui_button_text

style slot_button is gui_button
style slot_button_text is gui_button_text
style slot_time_text is slot_button_text
style slot_name_text is slot_button_text

style page_label:
    xpadding 75
    ypadding 5

style page_label_text:
    text_align 0.5
    layout "subtitle"
    hover_color gui.hover_color

style page_button:
    properties gui.button_properties("page_button")

style page_button_text:
    properties gui.button_text_properties("page_button")

style slot_button:
    properties gui.button_properties("slot_button")

style slot_button_text:
    properties gui.button_text_properties("slot_button")


style pref_label is gui_label
style pref_label_text is gui_label_text
style pref_vbox is vbox

style radio_label is pref_label
style radio_label_text is pref_label_text
style radio_button is gui_button
style radio_button_text is gui_button_text
style radio_vbox is pref_vbox

style check_label is pref_label
style check_label_text is pref_label_text
style check_button is gui_button
style check_button_text is gui_button_text
style check_vbox is pref_vbox

style slider_label is pref_label
style slider_label_text is pref_label_text
style slider_slider is gui_slider
style slider_button is gui_button
style slider_button_text is gui_button_text
style slider_pref_vbox is pref_vbox

style mute_all_button is check_button
style mute_all_button_text is check_button_text

style pref_label:
    top_margin gui.pref_spacing
    bottom_margin 3

style pref_label_text:
    yalign 1.0

style pref_vbox:
    xsize 338

style radio_vbox:
    spacing gui.pref_button_spacing

style radio_button:
    properties gui.button_properties("radio_button")
    foreground "gui/button/check_[prefix_]foreground.png"

style radio_button_text:
    properties gui.button_text_properties("radio_button")

style check_vbox:
    spacing gui.pref_button_spacing

style check_button:
    properties gui.button_properties("check_button")
    foreground "gui/button/check_[prefix_]foreground.png"

style check_button_text:
    properties gui.button_text_properties("check_button")

style slider_slider:
    xsize 525

style slider_button:
    properties gui.button_properties("slider_button")
    yalign 0.5
    left_margin 15

style slider_button_text:
    properties gui.button_text_properties("slider_button")

style slider_vbox:
    xsize 675

screen history():


    predict False tag menu

    use game_menu(_("История"), scroll=("vpgrid" if gui.history_height else "viewport"), yinitial=1.0):

        style_prefix "history"

        for h in _history_list:

            window:

                has fixed:
                    yfit True

                if h.who:

                    label h.who:
                        style "history_name"

                        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

        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

screen help():
    tag menu


    default device = "keyboard"

    use game_menu(_("Помощь"), scroll="viewport"):

        style_prefix "help"

        vbox:
            spacing 23

            hbox:

                textbutton _("Клавиатура") action SetScreenVariable("device", "keyboard")
                textbutton _("Мышь") action SetScreenVariable("device", "mouse")

                if GamepadExists():
                    textbutton _("Геймпад") action SetScreenVariable("device", "gamepad")

            if device == "keyboard":
                use keyboard_help
            elif device == "mouse":
                use mouse_help
            elif device == "gamepad":
                use gamepad_help


screen keyboard_help():

    hbox:
        label _("Enter")
        text _("Прохождение диалогов, активация интерфейса.")

    hbox:
        label _("Пробел")
        text _("Прохождение диалогов без возможности делать выбор.")

    hbox:
        label _("Стрелки")
        text _("Навигация по интерфейсу.")

    hbox:
        label _("Esc")
        text _("Вход в игровое меню.")

    hbox:
        label _("Ctrl")
        text _("Пропускает диалоги, пока зажат.")

    hbox:
        label _("Tab")
        text _("Включает режим пропуска.")

    hbox:
        label _("Page Up")
        text _("Откат назад по сюжету игры.")

    hbox:
        label _("Page Down")
        text _("Откатывает предыдущее действие вперёд.")

    hbox:
        label "H"
        text _("Скрывает интерфейс пользователя.")

    hbox:
        label "S"
        text _("Делает снимок экрана.")

    hbox:
        label "V"
        text _("Включает поддерживаемый {a=https://www.renpy.org/l/voicing}синтезатор речи{/a}.")


screen mouse_help():

    hbox:
        label _("Левый клик")
        text _("Прохождение диалогов, активация интерфейса.")

    hbox:
        label _("Клик колёсиком")
        text _("Скрывает интерфейс пользователя.")

    hbox:
        label _("Правый клик")
        text _("Вход в игровое меню.")

    hbox:
        label _("Колёсико вверх\nКлик на сторону отката")
        text _("Откат назад по сюжету игры.")

    hbox:
        label _("Колёсико вниз")
        text _("Откатывает предыдущее действие вперёд.")


screen gamepad_help():

    hbox:
        label _("Правый триггер\nA/Нижняя кнопка")
        text _("Прохождение диалогов, активация интерфейса.")

    hbox:
        label _("Левый Триггер\nЛевый Бампер")
        text _("Откат назад по сюжету игры.")

    hbox:
        label _("Правый бампер")
        text _("Откатывает предыдущее действие вперёд.")


    hbox:
        label _("Крестовина, Стики")
        text _("Навигация по интерфейсу.")

    hbox:
        label _("Start, Guide")
        text _("Вход в игровое меню.")

    hbox:
        label _("Y/Верхняя кнопка")
        text _("Скрывает интерфейс пользователя.")

    textbutton _("Калибровка") action GamepadCalibrate()


style help_button is gui_button
style help_button_text is gui_button_text
style help_label is gui_label
style help_label_text is gui_label_text
style help_text is gui_text

style help_button:
    properties gui.button_properties("help_button")
    xmargin 12

style help_button_text:
    properties gui.button_text_properties("help_button")

style help_label:
    xsize 375
    right_padding 30

style help_label_text:
    size gui.text_size
    xalign 1.0
    text_align 1.0

screen confirm(message, yes_action, no_action):

    modal True

    zorder 1001

    style_prefix "confirm"

    add "gui/overlay/confirm.png"
    add "images/confirm1.png":
        xalign .5 yalign .5

    fixed:
        xmaximum 734 ymaximum 400
        xalign .51 yalign .45
        vbox:
            xalign .5
            yalign .45
            spacing 45

            label _(message):
                style "confirm_prompt"
                xalign 0.5

        hbox:
            ypos 310

            imagebutton:
                xpos 11
                idle "images/buttons/1_invisible.png"
                hover "images/buttons/yes1_active.png"
                action yes_action
            imagebutton:
                xpos 172
                idle "images/buttons/1_invisible.png"
                hover "images/buttons/no1_active.png"
                action no_action

style confirm_frame is gui_frame
style confirm_prompt is gui_prompt
style confirm_prompt_text is gui_prompt_text
style confirm_button is gui_medium_button
style confirm_button_text is gui_medium_button_text

style confirm_frame:
    background Frame([ "gui/confirm_frame.png", "gui/frame.png"], gui.confirm_frame_borders, tile=gui.frame_tile)
    padding gui.confirm_frame_borders.padding
    xalign .5
    yalign .5

style confirm_prompt_text:
    text_align 0.5
    layout "subtitle"

style confirm_button:
    properties gui.button_properties("confirm_button")

style confirm_button_text:
    properties gui.button_text_properties("confirm_button")

screen skip_indicator():

    zorder 100
    style_prefix "skip"

    frame:

        has hbox:
            spacing 9

        text _("Пропускаю")

        text "▸" at delayed_blink(0.0, 1.0) style "skip_triangle"
        text "▸" at delayed_blink(0.2, 1.0) style "skip_triangle"
        text "▸" at delayed_blink(0.4, 1.0) style "skip_triangle"

transform delayed_blink(delay, cycle):
    alpha .5

    pause delay
    block:

        linear .2 alpha 1.0
        pause .2
        linear .2 alpha 0.5
        pause (cycle - .4)
        repeat


style skip_frame is empty
style skip_text is gui_text
style skip_triangle is skip_text

style skip_frame:
    ypos gui.skip_ypos
    background Frame("gui/skip.png", gui.skip_frame_borders, tile=gui.frame_tile)
    padding gui.skip_frame_borders.padding

style skip_text:
    size gui.notify_text_size

style skip_triangle:
    font "DejaVuSans.ttf"

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")

screen nvl(dialogue, items=None):

    window:
        style "nvl_window"

        has vbox:
            spacing gui.nvl_spacing

        if gui.nvl_height:

            vpgrid:
                cols 1
                yinitial 1.0

                use nvl_dialogue(dialogue)

        else:

            use nvl_dialogue(dialogue)

        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

            has 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

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

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
# Decompiled by unrpyc: https://github.com/CensoredUsername/unrpyc
