Toast message in GS

In Android if you want to show/fade in a quick message to the user and then fade out that message it's called a "toast".

Eg:
When the user presses on a "Level 9" graphic you display the message "This level is currently locked"

How can I do this in GS?
Will I have to make a custom animation for each message or is there an easier way?

Thanks!

Comments

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    You could create one actor with a Display Text Behavior and use a Text Attribute as the text displayed. Just feed the Text Attribute a new line of text each time using a Change Attribute Behavior.

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408

    just interpolate the alpha value down to 0 over set time period. I do it all the time on button pushes

    when touch is pressed
    change alpha value to 0
    
    when alpha value is 0
    intepolate alpha to 1 over .5 seconds
    

    when you touch the button it will flash away then fade back in. you can do it reverse for a notification

    when touch is pressed
    interpolate alpha to 0 over .5 seconds
    after .5 seconds destroy actor
    

    or something like that

  • ryastryast Member Posts: 145

    Thanks guys! Will try what you wrote and come back if I have problems :)

Sign In or Register to comment.