Fade elements in/out

Special forum to share and discuss skins for Pano2VR and Object2VR
Post Reply
Lou
Posts: 31
Joined: Wed Oct 04, 2017 4:54 pm

Hello,

Is it possible to make the transition of opening an element, such as 'dropdown menu', fade in and out when you click on it to open, rather than instantly appearing and disappearing?

Thanks :)
User avatar
Hopki
Gnome
Posts: 13005
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi,
Yes rather than use show and hide, use Alpha.
So with visible selected set the Alpha to 0.00.
Then use a toggle Alpha action to 1.00.
Regards,
Hopki
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
Lou
Posts: 31
Joined: Wed Oct 04, 2017 4:54 pm

That’s great. Thanks for your help!
Lou
Posts: 31
Joined: Wed Oct 04, 2017 4:54 pm

Hi Hopki,

I've had a play around with Alpha settings and I'm still a bit confused! So out of the 3 actions that are set for the dropdown menu, I only need to set the parameters for 2? I've manged to get the top bar to fade out...but then vanish! But then it doesn't fade back in and the dropdown itself doesn't fade at all..

Thanks so much for your help!
User avatar
Hopki
Gnome
Posts: 13005
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

See attached.
Look at the actions in the Dropdown Menu Title Background
Then the elements the actions effect make sure you you select visible and set their Alpha.
Regards,
Hopki
Attachments
alpha_menu.zip
(55.91 KiB) Downloaded 240 times
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
Lou
Posts: 31
Joined: Wed Oct 04, 2017 4:54 pm

That's fab! Thank you, Hopki - I see what I was doing wrong now! :)
User avatar
mark
Posts: 39
Joined: Tue Sep 26, 2006 4:24 pm
Location: Munich, Germany
Contact:

Is it also possible to fade in / fade out images?

I made a small image to be showed when the player is mobile and itÄ's aspect ratio is smaller than "1" to inform the user that i should turn the device. This works well.

But when i set alpha instead of visibility and check the Transition-checkbox no transition is happening here. Is toggling alpha and transition the same?
Bildschirmfoto 2019-01-03 um 09.41.05 AM.png
Bildschirmfoto 2019-01-03 um 09.41.05 AM.png (231.67 KiB) Viewed 4844 times
User avatar
Hopki
Gnome
Posts: 13005
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi Mark,
Very odd this works for me.
Do you have any other logic block in the elements properties that do not have a transition?
If you have a transition in one logic block for an element then any other logic blocks need the traction selected, its juts how CSS works.
If not, can you copy the graphic with its logic block actions to a new skin and post it.
Regards,
Hopki
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
User avatar
mark
Posts: 39
Joined: Tue Sep 26, 2006 4:24 pm
Location: Munich, Germany
Contact:

I don't understand.

I made a new example with just the graphic, visible but with alpha ="0" and the logic block to let alphe ="1" (with transition of 1 sec) if Screen is in portrait orientation. I removed the ismobile argument for testing this with my regular pc/mac but there's no transition / fading. It just shows and hides when i resize the browser window.

You can look here: https://www.marksimons.de/tmp/p2vr/tilt/ and download the project file: https://www.marksimons.de/tmp/p2vr/tilt/tilt.zip (310 kB)

PS: When changing the screen orientation vice versa then once in many times the fading appeared but i can't reproduce that. Also i tried Firefox and Safari but both dont work...
User avatar
Hopki
Gnome
Posts: 13005
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi Mark,
Ahhhh, yes, he problem is with the anchor centre, this brakes things.
What you need to do is wrap a container around the graphic and set that to centre.
As a container is set to permeable by default if won't interfere with anything.
Then you can set the graphic to anchor top left which then means the transition will work as required.
Please see attached skin.
Regards,
Hopki
Attachments
tilt.ggsk
(6.81 KiB) Downloaded 201 times
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
User avatar
mark
Posts: 39
Joined: Tue Sep 26, 2006 4:24 pm
Location: Munich, Germany
Contact:

Thank you very much Hopki!

Mark
Post Reply