responsiveness

Q&A about the latest versions
Post Reply
User avatar
sndrgn
Posts: 83
Joined: Mon Jun 19, 2017 12:32 pm
Location: Dortmund, Germany
Contact:

Hi @all, I think there is a simple solution for my question, but I didn't find it. So: depending on the screen size I want a navigation menu to be displayed or to be hidden. I tried with a logic block but didn't succeed. Has anyone a solution or a link to a tutorial or a blog post?

Here is the tour:
https://vrtours.businessview.ruhr/vorsc ... DO/KITA02/

thanks!
User avatar
Tony
Posts: 1342
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Hi,
So: depending on the screen size I want a navigation menu to be displayed or to be hidden.
Are you referring to the flyout menu on the right?

Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: https://tonyredhead.com - https://redsquare.com | Pano2VR Tutorials: https://tonyredhead.com/pano2vr | instagram: https://www.instagram.com/tonyredhead/
User avatar
sndrgn
Posts: 83
Joined: Mon Jun 19, 2017 12:32 pm
Location: Dortmund, Germany
Contact:

Yes
User avatar
Tony
Posts: 1342
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Hi,

I've created a sample file and a video showing the final result.

mobile_1.png
mobile_1.png (373.72 KiB) Viewed 1444 times


Working Version: https://p2vr.s3.ap-southeast-2.amazonaw ... index.html

I've attached the skin and the video can be viewed/downloaded here: https://p2vr.s3.ap-southeast-2.amazonaw ... Slider.mp4

I've created a simple slider that moves in and out when you click on the slide_tab.

The initial position of the slide container is -300px

The slide_tab has two Mouse Click Actions that set two variables to true when it is clicked;

a. vis_slider
b. vis_slider_status

The slide container has a logic block for the Position that sets an X position of 0 pixels when the variable vis_slider = true

The other variable vis_slider_status lets us know that the slider container is in the open state.

The slider container has two Player State Changed actions that set the vis_slider variable to true or false based on two conditions;

a. If the browser width is less than 600px and the vis_slider_status is true then set the vis_slider variable = false (closing the slider)
b. If the browser width is greater than 601px and the vis_slider_status is true then set the vis_slider variable = true (open the slider)

regards,

Tony
Attachments
logic_slider.ggsk
(2.09 KiB) Downloaded 62 times
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: https://tonyredhead.com - https://redsquare.com | Pano2VR Tutorials: https://tonyredhead.com/pano2vr | instagram: https://www.instagram.com/tonyredhead/
User avatar
sndrgn
Posts: 83
Joined: Mon Jun 19, 2017 12:32 pm
Location: Dortmund, Germany
Contact:

Hej Tony, this is really great support!!! Thanks for your help, I will test it tomorrow. Have a great day! Chris
Post Reply