Change Button When Clicked?

Q&A about the latest versions
Post Reply
missingman
Posts: 27
Joined: Mon Apr 16, 2018 10:05 am

Fri May 11, 2018 6:29 pm

Hi all.

I have made a button that toggles my pano titles on and off. It works to a certain degree but I think I've got the whole concept wrong.

Here's a tour example with it in action:

http://missingman.co.uk/chapel/

It's the button on the right (Letter "A" with a line through it) and when clicked the image changes to one without a line through it and the tiles disappear. When clicked again, the image swaps back, the titles appear. So it seems to be working...

But, if you turn off the titles and then visit a hotspot, the titles reappear (don't want this to happen) but the button stays in the previous (and now wrong) state. It then needs two clicks to toggle things back correctly again.

Could someone give me some guidance to make the button work properly please.

Attached is my skin file.

Thanks
Steve
Attachments
wellington-school-v3.ggsk
(249.04 KiB) Downloaded 19 times
User avatar
Hopki
Gnome
Posts: 10183
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Fri May 11, 2018 8:13 pm

Hi Steve,
I would use a variable, something like: vis_tooltip, true/false and init value true.
Then under the visible logic block for the tooltip text box add the logic block:

vis_tooltip, =, false
Visible: false

Then you just need a button that would have the action:

mouse click, set variable value, vis_tooltip, Not(¬)

This will toggle the variable from true to false.
Regards,
Hopki
Hopki
Garden Gnome Software 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/
missingman
Posts: 27
Joined: Mon Apr 16, 2018 10:05 am

Fri May 11, 2018 8:41 pm

OK, I'll have a read up on that. Cheers

Here's the other question that I asked in my email but not the above post:

When dropping down to mobile size I'd like a different toolbar and the hotspot labels permanently disabled. (A toolbar with no label toggle switch of course - not needed if there are no labels). If this were a normal web page I'd just use a CSS media query. Do you have a way to swap toolbars and disable the labels like this?

Thanks for your help, hope you like my tour. It's become very clear that the photography is the easy bit :-)
User avatar
Hopki
Gnome
Posts: 10183
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Fri May 11, 2018 9:46 pm

"It's become very clear that the photography is the easy bit"
Once you get to grips with it your find it is logical.

You have logic blocks, one of the triggers being Is Mobile.

So for something you want to hide if being displayed on a mobile, just set the visible logic block to:
Is Mobile, =, true, visible false

So knowing you can use an Is Mobile trigger you can also use scale to make something smaller.
Or have an element that only shows when the Is Mobile is used.


Of course you can also use the player width trigger.
Have a look at this post: viewtopic.php?f=22&t=11710#p48283
Regards,
Hopki
Hopki
Garden Gnome Software 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/
missingman
Posts: 27
Joined: Mon Apr 16, 2018 10:05 am

Sat May 12, 2018 12:03 am

Great, thanks for your help.
Post Reply