init python:
    asset_pre = ""
    if _preferences.language != None:
        asset_pre = f"/tl/{_preferences.language}/"

init:
    $ ABE_Root = "mods/A Bad Experience/assets/"

#Characters
define Jacob = Character(_("Jacob"), color="#859674", who_outlines=[(gui.name_text_thickness, '#312727')])
define Doc = Character(_("Doc"), color="#725051", who_outlines=[(gui.name_text_thickness, '#312727')])

image StText = Text(_("Stella"), base, color="#D5FFAE", who_outlines=[(gui.name_text_thickness, '#859674')])
image ChText = Text(_("Chet"), base, color="#B45411", who_outlines=[(gui.name_text_thickness, '#BF5F81')])
define StyChet = Character('{image=StText} & {image=ChText}', color = "#ffffff", who_outlines=[(gui.name_text_thickness, '#000000')])

#BG
image ABE_streetnight_1 = im.Scale(Image(ABE_Root + "bgs/streetnight_1.png"), 1920, 1080)
image ABE_fronthouse = im.Scale(Image(ABE_Root + "bgs/fronthouse.png"), 1920, 1080)
image ABE_frontgateinside open = im.Scale(Image(ABE_Root + "bgs/frontgateinside open.png"), 1920, 1080)
image ABE_frontgateinside closed = im.Scale(Image(ABE_Root + "bgs/frontgateinside close.png"), 1920, 1080)
image ABE_fronthouse = im.Scale(Image(ABE_Root + "bgs/fronthouse.png"), 1920, 1080)
image ABE_insidehouse = im.Scale(Image(ABE_Root + "bgs/MonsterHouse.png"), 1920, 1080)
image ABE_insidehousedoor = im.Scale(Image(ABE_Root + "bgs/MonsterHouse Door.png"), 1920, 1080)
image ABE_basement1 = im.Scale(Image(ABE_Root + "bgs/basement1.png"), 1920, 1080)
image ABE_basement2 = im.Scale(Image(ABE_Root + "bgs/basement2.png"), 1920, 1080)
image ABE_basement3 dark = (ABE_Root + "bgs/basement3_dark.png")
image ABE_basement3 light = (ABE_Root + "bgs/basement3_light.png")
image ABE_basement3 lightb = (ABE_Root + "bgs/basement3_lightb.png")
image ABE_ProyectingCredits = (ABE_Root + "bgs/ProyectingCredits.png")

#CG'S
image ABE_Therapy start1 = im.Scale(Image(ABE_Root + "cg's/Therapy1.png"), 1920, 1080)
image ABE_Therapy start2 = im.Scale(Image(ABE_Root + "cg's/Therapy2.png"), 1920, 1080)
image ABE_fiveSurprises = im.Scale(Image(ABE_Root + "cg's/fiveSurprises.png"), 1920, 1080)
# image ABE_TrapDooropen1 = im.Scale(Image(ABE_Root + "cg's/UnderHERtail.png"), 1920, 1080)
# image ABE_TrapDooropen1 = im.Scale(Image(ABE_Root + "cg's/Undertail.png"), 1920, 1080)
# image ABE_TrapDooropen3 = im.Scale(Image(ABE_Root + "cg's/Under.png"), 1920, 1080)
image ABE_TrapDoor open:
    ABE_Root + "cg's/UnderHERtail.png"
    pause 0.2
    ABE_Root + "cg's/Undertail.png"
    pause 0.2
    ABE_Root + "cg's/Under.png"
image ABE_TrapDoor close = im.Scale(Image(ABE_Root + "cg's/TrapDoor.png"), 1920, 1080)
image ABE_Therapy intense1 = im.Scale(Image(ABE_Root + "cg's/AndNobodyCome.png"), 1920, 1080)
image ABE_Therapy intense2 = im.Scale(Image(ABE_Root + "cg's/AndNobodyCome right.png"), 1920, 1080)
image ABE_Evangelion normal = im.Scale(Image(ABE_Root + "cg's/Evangelion1.png"), 1920, 1080)
image ABE_Evangelion crying = im.Scale(Image(ABE_Root + "cg's/Evangelion2.png"), 1920, 1080)
image ABE_Undercover:
    ABE_Root + "cg's/Undercover1.png"
    alpha 1.0
    pause 1.3
    alpha 0.0
    pause 0.7
    ABE_Root + "cg's/Undercover2.png"
    alpha 1.0
    pause 1.3
    alpha 0.0
    pause 0.7
    ABE_Root + "cg's/Undercover3.png"
    alpha 1.0
    pause 1.3
    alpha 0.0
    pause 0.7
    ABE_Root + "cg's/Undercover4.png"
    alpha 1.0
image ABE_TheNextOne = im.Scale(Image(ABE_Root + "cg's/TouchToneTelephone.png"), 1920, 1080)
image ABE_Moviecredits = (ABE_Root + "cg's/MovieCredits.png")
#props:

#Assets en basement1:
image ABE_WellCUM = (ABE_Root + "props/WellcomeToYourDOOM-Merasmus.png")
image ABE_WellCUM nt = (ABE_Root + "props/UShoudNotPass.png")
image ABE_SmokePhoto = (ABE_Root + "props/Smoke.png")
image ABE_SmokePhoto back = (ABE_Root + "props/Smoke_back.png")
image ABE_HiddenCamera = (ABE_Root + "props/camera.png")
image ABE_Cellphone = (ABE_Root + "props/CellPhone.png")
image ABE_Key = (ABE_Root + "props/key.png")

#Assets en basement2:
image ABE_Bust1 = (ABE_Root + "props/maniki1.png")
image ABE_AnotherCellphone = (ABE_Root + "props/Barbie Phone.png")
image ABE_Bust2 = (ABE_Root + "props/maniki2.png")
image ABE_Heart = (ABE_Root + "props/heart.png")
image ABE_Heart madeInChina= (ABE_Root + "props/heart madeInChina.png")
image ABE_Bust3 = (ABE_Root + "props/maniki3.png")
image ABE_OneLeft = (ABE_Root + "props/OneLeft.png")
image ABE_Bust4 = (ABE_Root + "props/maniki4.png")
image ABE_SecondKey = (ABE_Root + "props/Second Key.png")
image ABE_Bust5 = (ABE_Root + "props/maniki5.png")

#Characters Sprites

# JojoChet
image JojoChet neutral = (ABE_Root + "characters/JojoChet neutral.png")
image JojoChet happy = (ABE_Root + "characters/JojoChet happy.png")
image JojoChet phone = (ABE_Root + "characters/JojoChet phone.png")
image JojoChet phone_surprised = (ABE_Root + "characters/JojoChet phone surprised.png")
image JojoChet angry = (ABE_Root + "characters/JojoChet angry.png")
image JojoChet tired = (ABE_Root + "characters/JojoChet tired.png")
image JojoChet surprised = (ABE_Root + "characters/JojoChet surprised.png")
image JojoChet brooding = (ABE_Root + "characters/JojoChet brooding.png")
image JojoChet considering = (ABE_Root + "characters/JojoChet considering.png")
image JojoChet nervous = (ABE_Root + "characters/JojoChet nervous.png")
image JojoChet flexing = (ABE_Root + "characters/JojoChet flexing.png")
image JojoChet yelling = (ABE_Root + "characters/JojoChet yelling.png")

# SailorStella
image SailorStella neutral = (ABE_Root + "characters/SailorStella neutral.png")
image SailorStella happy = (ABE_Root + "characters/SailorStella happy.png")
image SailorStella worried = (ABE_Root + "characters/SailorStella worried.png")
image SailorStella brooding = (ABE_Root + "characters/SailorStella brooding.png")
image SailorStella tired = (ABE_Root + "characters/SailorStella tired.png")
#image SailorStella considering = im.Scale(Image(ABE_Root + "R.png"), 1040, 1500) Brooding
image SailorStella surprised = (ABE_Root + "characters/SailorStella surprised.png")
image SailorStella mad = (ABE_Root + "characters/SailorStella mad.png")

# ABE_Thief
image ABE_Thief = (ABE_Root + "characters/ABE_Thief.png")

# ABE_Jacob
image Jacob neutral = (ABE_Root + "characters/Jacob neutral.png")
image Jacob shadow = im.MatrixColor((ABE_Root + "characters/Jacob neutral.png"), im.matrix.tint(0.0, 0.0, 0.0))
image Jacob happy = (ABE_Root + "characters/Jacob happy.png")
image Jacob switch = (ABE_Root + "characters/Jacob switch.png")
image Jacob tender = (ABE_Root + "characters/Jacob tender.png")
image Jacob serious = (ABE_Root + "characters/Jacob serious.png")

# Flip versions
image ABE_Thief flip:
    "ABE_Thief"
    xzoom -1

image JojoChet neutral flip:
    "JojoChet neutral"
    xzoom -1
image JojoChet happy flip:
    "JojoChet happy"
    xzoom -1
image JojoChet phone flip:
    "JojoChet phone"
    xzoom -1
image JojoChet phone_surprised flip:
    "JojoChet phone_surprised"
    xzoom -1
image JojoChet angry flip:
    "JojoChet angry"
    xzoom -1
image JojoChet tired flip:
    "JojoChet tired"
    xzoom -1
image JojoChet surprised flip:
    "JojoChet surprised"
    xzoom -1
image JojoChet brooding flip:
    "JojoChet brooding"
    xzoom -1
image JojoChet considering flip:
    "JojoChet considering"
    xzoom -1
image JojoChet nervous flip:
    "JojoChet nervous"
    xzoom -1
image JojoChet flexing flip:
    "JojoChet flexing"
    xzoom -1
image JojoChet yelling flip:
    "JojoChet yelling"
    xzoom -1

# Flip versions for SailorStella
image SailorStella neutral flip:
    "SailorStella neutral"
    xzoom -1
image SailorStella happy flip:
    "SailorStella happy"
    xzoom -1
image SailorStella worried flip:
    "SailorStella worried"
    xzoom -1
image SailorStella brooding flip:
    "SailorStella brooding"
    xzoom -1
image SailorStella tired flip:
    "SailorStella tired"
    xzoom -1
# image SailorStella considering flip:
#     "SailorStella considering"
#     xzoom -1
image SailorStella surprised flip:
    "SailorStella surprised"
    xzoom -1
image SailorStella mad flip:
    "SailorStella mad"
    xzoom -1

# Flip versions for ABE_Jacob
image Jacob neutral flip:
    "Jacob neutral"
    xzoom -1
image Jacob shadow flip:
    "Jacob shadow"
    xzoom -1
image Jacob happy flip:
    "Jacob happy"
    xzoom -1
image Jacob switch flip:
    "Jacob switch"
    xzoom -1
image Jacob tender flip:
    "Jacob tender"
    xzoom -1
image Jacob serious flip:
    "Jacob serious"
    xzoom -1

#Screens
define CheckTheBackground = (ABE_Root + "CHECK THE FUCKING BACKGROUND.png")

transform CheckTheBackgroundFadeInOut:
    alpha 0.0
    linear 0.3 alpha 0.7
    linear 0.3 alpha 0.0
    linear 0.3 alpha 0.7
    linear 0.3 alpha 0.0

screen ABE2_PointAndClickMinigame1:
    add CheckTheBackground:
        xalign 0.5
        yalign 0.2
        at CheckTheBackgroundFadeInOut

    imagebutton:
        xalign -0.01
        yalign 0.06
        idle (ABE_Root + "button.png")
        hover (ABE_Root + "button_hover.png")
                #action Hide("button"), Jump("whathappened_storylineHotBoxing")
        action Jump("ABE2_Camera")

    imagebutton:
        xalign 0.108
        yalign 0.65
        idle (ABE_Root + "button.png")
        hover (ABE_Root + "button_hover.png")
                #action Hide("button"), Jump("whathappened_storylineHotBoxing")
        action Jump("ABE2_Phone")
    
    imagebutton:
        xalign 0.9
        yalign 0.65
        idle (ABE_Root + "button.png")
        hover (ABE_Root + "button_hover.png")
                #action Hide("button"), Jump("whathappened_storylineHotBoxing")
        action Jump("ABE2_Smoke")

screen ABE2_PointAndClickMinigame2:
    add CheckTheBackground:
        xalign 0.5
        yalign 0.2
        at CheckTheBackgroundFadeInOut

    imagebutton:
        xalign 0.1
        yalign 0.45
        idle (ABE_Root + "button.png")
        hover (ABE_Root + "button_hover.png")
                #action Hide("button"), Jump("whathappened_storylineHotBoxing")
        action Jump("ABE2_Bust1")

    imagebutton:
        xalign 0.23
        yalign 0.78
        idle (ABE_Root + "button.png")
        hover (ABE_Root + "button_hover.png")
                #action Hide("button"), Jump("whathappened_storylineHotBoxing")
        action Jump("ABE2_Bust2")
    
    imagebutton:
        xalign 0.5
        yalign 0.65
        idle (ABE_Root + "button.png")
        hover (ABE_Root + "button_hover.png")
                #action Hide("button"), Jump("whathappened_storylineHotBoxing")
        action Jump("ABE2_Bust3")

    imagebutton:
        xalign 0.87
        yalign 0.45
        idle (ABE_Root + "button.png")
        hover (ABE_Root + "button_hover.png")
                #action Hide("button"), Jump("whathappened_storylineHotBoxing")
        action Jump("ABE2_Bust4")

    imagebutton:
        xalign 0.4
        yalign 0.45
        idle (ABE_Root + "button.png")
        hover (ABE_Root + "button_hover.png")
                #action Hide("button"), Jump("whathappened_storylineHotBoxing")
        action Jump("ABE2_Bust5")