logic block show / hide elements for mobile

Special forum to share and discuss skins for Pano2VR and Object2VR
Post Reply
User avatar
stalwart
Posts: 651
Joined: Thu Oct 02, 2008 11:52 am

Hi all,

I’ve completed a complex tour of 3 x separate apartments – using tags to show / hide each apartment.

www.360imagery.co.uk/draft/bow_square_complete

Each tour includes a floor plan which I only want to show for tablet / desktop – so I’m using a logic block to hide the floor plan elements when the player width is less than 320 pixels wide for mobile. This theory works fine with a single apartment, but I’m using a splash start screen to choose apartments to view, and the trigger ‘mouse click’ is to hide the splash screen, and display the ‘view floor plan’ button. But what I need is a logic block to this action – i.e. only show the ‘view floor plan’ button if player width is more than 320 pixels wide (or keep hidden if less than 320px). Make sense?

At the moment the logic block works fine on desktop shrinking / expanding browser manually, but on mobile the action of mouse click a ‘view apartment’ button on the start splash screen loads the corresponding ‘view floor plan’ button automatically.

Any ideas?
Stu
User avatar
Hopki
Gnome
Posts: 13004
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi Stu,
Why not add the visible logic block width to each of the floor plans and the floor plan button?
Also I would swop the "change apartment" and "view floor plan" buttons so when you show and hide the view floorpan button you don't end up with a gap.
So when less than width I would also consider the width as some phones are wider than 320px.
Looking good though :-)
Cheers,
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
stalwart
Posts: 651
Joined: Thu Oct 02, 2008 11:52 am

Hi Martin,

Back from holiday(s) so soon....?!!!
Hopki wrote: Thu Oct 26, 2017 1:01 pm Why not add the visible logic block width to each of the floor plans and the floor plan button?
I have done - each floor plan launch button has a logic block action player Width > 400 visible: true, default: false.....It works resizing the browser, but I want this logic to apply to the apartment choice button call to action.
Hopki wrote: Thu Oct 26, 2017 1:01 pm Also I would swop the "change apartment" and "view floor plan" buttons so when you show and hide the view floorpan button you don't end up with a gap.
I need the gap as I use a "mini" player for mobile devices
Hopki wrote: Thu Oct 26, 2017 1:01 pm So when less than width I would also consider the width as some phones are wider than 320px.
What would you recommend? iOS I set @ 320 px - what about smartphone / Android "average"...?

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

Hummmm,
No idea what you mean, perhaps a call on the Bat phone!
Cheers,
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
stalwart
Posts: 651
Joined: Thu Oct 02, 2008 11:52 am

Hopki wrote: Thu Oct 26, 2017 1:30 pm Hummmm,
No idea what you mean, perhaps a call on the Bat phone!
HA! will do this PM. Have sent skin file via "bat-mail".....!
User avatar
Hopki
Gnome
Posts: 13004
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

For anyone following this thread.
As Stu was using the visible actions to show and hide the floor plans the fix was to use the Alpha logic block.
So when the player width was below a size all elements would hide with changing the alpha to 0.
This way not effecting the show and hide operations of the buttons.
Cheers,
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
stalwart
Posts: 651
Joined: Thu Oct 02, 2008 11:52 am

Thanks to Martin - all now fixed and working correctly:

www.360imagery.co.uk/draft/bow_square_complete/

3 x apartment virtual tours linked together as a "master" tour, but separated using tags.....

I love Pano2VR!

Stu
Post Reply