How to not display a box if player width is <=950

Special forum to share and discuss skins for Pano2VR and Object2VR
Post Reply
User avatar
SergePix
Posts: 108
Joined: Fri Feb 01, 2019 2:27 pm
Location: Quebec

Hello,

i was trying to find the right way that would not show the map if the screen is smaller than 950 but have the option to display it if needed.

I already have a button that toggle the map with a map_show_hide (true/false) variable.

On the map, I created a logic box:
Visible = enable
Variables: map_show_hide = false; visible = false

But the map_show_hide variable is at true by default.

How to set the map_show_hide variable to false if the screen is <= 950.
Serge
Version: V7.01
Windows 10
User avatar
Hopki
Gnome
Posts: 13005
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi,
Please find project attached.
How it works...
The skin as a variable: vis_map, true/false, true.

The Map/text box has its visible check box deselected but has a visible logic block: *vis_map = true, Visible: true.
The map will show on project open because the variable is set to true.

The Toggle button has the action: mouse click, set variable value, vis_map, Not(¬)
This action toggles the variable between true and false thus hiding and showing the map.

It also has the action: start, set variable value, vis_map, Set(=), false.
Now this would on project open set the variable to false so the map will not show.
But of course we only want this to happen if the player is 950px or below.

To do this there is an action filter that states: Player Width, <=, 960.
So this action only gets executed if the player window is 950px or below.

Please see: Logic Blocks and Action Filters.


Regards,
Hopki
Attachments
toggle.zip
(12.03 KiB) Downloaded 195 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
SergePix
Posts: 108
Joined: Fri Feb 01, 2019 2:27 pm
Location: Quebec

Hello Hopki,

it works perfectly! :D

Thanks for your help!
Serge
Version: V7.01
Windows 10
Post Reply