Page 1 of 1

Animate Choices [SOLVED]

Posted: Thu Jul 25, 2019 8:36 pm
by ArizaLuca
I want the choices to animate slightly-- for example when I hover over them, they rise slightly or whatnot-- and have put an ATL in there as follows:

Code: Select all

transform choiceappear:
    alpha 0.0 yoffset -1.0
    pause 0.0
    easein 0.5 alpha 1.0 yoffset 0
    on idle:
        alpha 1.0 yoffset 0
    on hover:
        alpha 1.0 yoffset 0
        easein 0.3 yoffset -0.5
Unfortunately the buttons don't... do that?

They're coded in like this.

Code: Select all

screen choice(items):
    modal False

    fixed:
        at gui_inout
        add "choiceoverlay":
            alpha 0.7

        hbox:
            xcenter 0.5
            yalign 0.3
            spacing 80

            for i in items:
                button:
                    xysize (350, 600)
                    left_padding 60
                    right_padding 50
                    top_padding 100
                    background "gui/choice/choice_idle_background.png"
                    hover_background "gui/choice/choice_hover_background.png"
                    text i.caption xalign 0.5 style "choice_button_text"
                    hovered Play("system",guisfx_button_hover)
                    action [Play("system",guisfx_button_click),
                           i.action]
                    at choiceappear
It just won't do it. There's nothing inherently wrong; just no transition or anything.

For anyone who saw my previous thread about my Choice screen, I apologize for my awful ability to understand code, but I felt this was a different issue and so it fit more to put it in a new thread.

Re: Animate Choices

Posted: Thu Jul 25, 2019 9:19 pm
by trajano
I think this may be similar to the problem I am facing, but I am having the issue with the "say" screen https://github.com/renpy/renpy/issues/1960

Re: Animate Choices

Posted: Fri Jul 26, 2019 8:01 am
by ArizaLuca
I don't think I'm supposed to put quotation marks around the transform? I've never done it before. (Nope, I'm not, just tested it.)

I really don't know why the transform isn't applying to the choice? Or if there's a different way you're supposed to animate choices.

Re: Animate Choices

Posted: Fri Jul 26, 2019 12:53 pm
by Kia
try:

Code: Select all

transform choiceappear:
    alpha 0.0 yoffset -10
    pause 0.0
    easein 0.5 alpha 1.0 yoffset 0
    on idle:
        easein 0.3 yoffset 0
    on hover:
        easein 0.3 yoffset -10

Re: Animate Choices

Posted: Fri Jul 26, 2019 12:59 pm
by ArizaLuca
Oh! Alright, that worked. I guess I need to put in bigger numbers for yoffset xD

Thank you!